Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(f39): Use official images for Silverblue, Kinoite, and Sericea #407

Merged
merged 5 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
merge_group:
schedule:
- cron: '0 7 * * *' # 7 am everyday
- cron: '0 15 * * *' # 3pm UTC everyday (timed against official fedora container pushes)
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
Expand Down Expand Up @@ -68,11 +68,19 @@ jobs:
- name: Matrix Variables
shell: bash
run: |
if [[ "${{ matrix.image_name }}" == "lxqt" || "${{ matrix.image_name }}" == "mate" ]]; then
echo "SOURCE_IMAGE=base" >> $GITHUB_ENV
if [[ "${{ matrix.major_version }}" -ge "39" ]] && \
grep "${{ matrix.image_name }}" <<< "silverblue, kinoite, sericea"; then
echo "SOURCE_ORG=fedora" >> $GITHUB_ENV
echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV
else
echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV
if [[ "${{ matrix.image_name }}" == "lxqt" || "${{ matrix.image_name }}" == "mate" ]]; then
echo "SOURCE_IMAGE=base" >> $GITHUB_ENV
else
echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV
fi
echo "SOURCE_ORG=fedora-ostree-desktops" >> $GITHUB_ENV
fi

# THE FOLLOWING IS MESSY BUT TEMPORARY UNTIL F38 IS GONE
# see: https://github.com/ublue-os/main/issues/369
# Fedora 39+ images do not include custom kmods (legacy)
Expand Down Expand Up @@ -146,7 +154,7 @@ jobs:
- name: Get current version
id: labels
run: |
ver=$(skopeo inspect docker://quay.io/fedora-ostree-desktops/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
ver=$(skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
echo "VERSION=$ver" >> $GITHUB_OUTPUT

# Generate image metadata
Expand Down Expand Up @@ -175,6 +183,7 @@ jobs:
${{ steps.generate-tags.outputs.alias_tags }}
build-args: |
IMAGE_NAME=${{ matrix.image_name }}
SOURCE_ORG=${{ env.SOURCE_ORG }}
SOURCE_IMAGE=${{ env.SOURCE_IMAGE }}
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
3 changes: 2 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}"
ARG BASE_IMAGE="quay.io/fedora-ostree-desktops/${SOURCE_IMAGE}"
ARG SOURCE_ORG="${SOURCE_IMAGE:-fedora-ostree-desktops}"
ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}"

FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS nokmods
Expand Down