From 683eebad169cd94e68df4eec4ca4cb0f8720859f Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Tue, 31 Oct 2023 15:10:40 -0600 Subject: [PATCH 1/5] feat(f39): Use official images for Silverblue, Kinoite, Onyx, and Sericea --- .github/workflows/build.yml | 15 ++++++++++++--- Containerfile | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c70173e..7cf820d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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.fedora_version }}" -ge "39" ]] && \ + grep "${{ matrix.image_name }}" <<< "silverblue, kinoite, onyx, 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) @@ -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 }} diff --git a/Containerfile b/Containerfile index 80ae7a0c..a410af41 100644 --- a/Containerfile +++ b/Containerfile @@ -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 From 3dab5fb877db85312f92cff7b7bfaf550ed1c0fc Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 16:19:30 -0500 Subject: [PATCH 2/5] feat(f39): Use official images for Silverblue, Kinoite, and Sericea This commit removes Oynx from the "official" list since Fedora is not yet publishing those container images on quay like the rest. Also, ensures we inspect the version of the correct upstream image. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7cf820d7..521aea92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,7 +69,7 @@ jobs: shell: bash run: | if [[ "${{ matrix.fedora_version }}" -ge "39" ]] && \ - grep "${{ matrix.image_name }}" <<< "silverblue, kinoite, onyx, sericea"; then + grep "${{ matrix.image_name }}" <<< "silverblue, kinoite, sericea"; then echo "SOURCE_ORG=fedora" >> $GITHUB_ENV echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV else @@ -154,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 From 746946802576f029c5a17686b586699b449b5d26 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 16:36:03 -0500 Subject: [PATCH 3/5] fix(f39): use correct matrix variable --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 521aea92..0e24e1cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: - name: Matrix Variables shell: bash run: | - if [[ "${{ matrix.fedora_version }}" -ge "39" ]] && \ + if [[ "${{ matrix.fedora_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 From d982c41bd50a64f9653af98d16a2817063b4d1d8 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 16:39:10 -0500 Subject: [PATCH 4/5] fix(f39): really the right matrix variable name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e24e1cd..1298a30a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: - name: Matrix Variables shell: bash run: | - if [[ "${{ matrix.fedora_major_version }}" -ge "39" ]] && \ + 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 From d120f158513af44005aae40f56139fa77e995cf6 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 31 Oct 2023 22:08:45 -0500 Subject: [PATCH 5/5] feat(f39): set cron time for new official builds --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1298a30a..92c04f4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }}