From 7620bb98674330d56f8c6a002e80b62a39ebd810 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 19:30:25 +0000 Subject: [PATCH 1/9] chore: switch to official upstream images --- .github/workflows/reusable-build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 0ac8feaa..d4519a41 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -34,6 +34,15 @@ jobs: - base - lazurite - vauxite + include: + - image_name: silverblue + base_image: quay.io/fedora/fedora-silverblue + - image_name: kinoite + base_image: quay.io/fedora/fedora-kinoite + - image_name: sericea + base_image: quay.io/fedora/fedora-sway-atomic + - image_name: onyx + base_image: quay.io/fedora/fedora-budgie-atomic steps: # Checkout push-to-registry action GitHub repository @@ -190,6 +199,7 @@ jobs: tags: | ${{ steps.generate-tags.outputs.alias_tags }} build-args: | + ${{ matrix.image-registry && format('BASE_IMAGE={0}', matrix.base-image) || '' }} IMAGE_NAME=${{ matrix.image_name }} SOURCE_ORG=${{ env.SOURCE_ORG }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} From 0a5e79e14707fa4b940564feffdfd5a45ce7ee76 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 19:31:04 +0000 Subject: [PATCH 2/9] fix: base image matrix build arg --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d4519a41..39f9d672 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -199,7 +199,7 @@ jobs: tags: | ${{ steps.generate-tags.outputs.alias_tags }} build-args: | - ${{ matrix.image-registry && format('BASE_IMAGE={0}', matrix.base-image) || '' }} + ${{ matrix.base-image && format('BASE_IMAGE={0}', matrix.base-image) || '' }} IMAGE_NAME=${{ matrix.image_name }} SOURCE_ORG=${{ env.SOURCE_ORG }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} From 258f9eb780bf8d3c61f638a53da7b27db18958c7 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 19:36:41 +0000 Subject: [PATCH 3/9] fix: update base_image matrix variable casing --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 39f9d672..b9d439a1 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -199,7 +199,7 @@ jobs: tags: | ${{ steps.generate-tags.outputs.alias_tags }} build-args: | - ${{ matrix.base-image && format('BASE_IMAGE={0}', matrix.base-image) || '' }} + ${{ matrix.base_image && format('BASE_IMAGE={0}', matrix.base_image) || '' }} IMAGE_NAME=${{ matrix.image_name }} SOURCE_ORG=${{ env.SOURCE_ORG }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} From 51d2ad9156244c3cfe09b1a7ae882d0f04643bb7 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 19:43:51 +0000 Subject: [PATCH 4/9] fix: pull the correct base image --- .github/workflows/reusable-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index b9d439a1..b1955f14 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -169,7 +169,11 @@ jobs: command: | # pull the base image used for FROM in containerfile so # we can retry on that unfortunately common failure case - podman pull quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }} + if [[ -n "${{ matrix.base_image }}" ]]; then + podman pull ${{ matrix.base_image }}:${{ matrix.fedora_version }} + else + podman pull quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }} + fi podman pull ${{ env.IMAGE_REGISTRY }}/akmods:main-${{ matrix.fedora_version }} podman pull ${{ env.IMAGE_REGISTRY }}/main-kernel:${{ env.KERNEL_VERSION }} From 6978934be4faa56eb2a94d91f111ba68ecd53ddf Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 20:01:51 +0000 Subject: [PATCH 5/9] chore: reverse --- .github/workflows/reusable-build.yml | 32 ++++++++++++++-------------- Containerfile | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index b1955f14..e7df13a0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -8,6 +8,7 @@ on: type: string env: IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + SOURCE_ORG: fedora concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.fedora_version }} @@ -35,14 +36,16 @@ jobs: - lazurite - vauxite include: - - image_name: silverblue - base_image: quay.io/fedora/fedora-silverblue - - image_name: kinoite - base_image: quay.io/fedora/fedora-kinoite + - image_name: base + source_org: fedora-ostree-desktops + - image_name: lazurite + source_org: fedora-ostree-desktops + - image_name: vauxite + source_org: fedora-ostree-desktops - image_name: sericea - base_image: quay.io/fedora/fedora-sway-atomic + source_image: sway-atomic - image_name: onyx - base_image: quay.io/fedora/fedora-budgie-atomic + source_image: budgie-atomic steps: # Checkout push-to-registry action GitHub repository @@ -52,12 +55,14 @@ jobs: - name: Matrix Variables shell: bash run: | - if [[ "${{ matrix.image_name }}" == "mate" ]]; then - echo "SOURCE_IMAGE=base" >> $GITHUB_ENV + if [[ -n "${{ matrix.source_image }}" ]]; then + echo "SOURCE_IMAGE=${{ matrix.source_image }}" >> $GITHUB_ENV else - echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV + echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV + fi + if [[ -n "${{ matrix.source_org }}" ]]; then + echo "SOURCE_ORG=${{ matrix.source_org }}" >> $GITHUB_ENV fi - echo "SOURCE_ORG=fedora-ostree-desktops" >> $GITHUB_ENV echo "IMAGE_NAME=${{ matrix.image_name }}-main" >> $GITHUB_ENV - name: Generate tags @@ -169,11 +174,7 @@ jobs: command: | # pull the base image used for FROM in containerfile so # we can retry on that unfortunately common failure case - if [[ -n "${{ matrix.base_image }}" ]]; then - podman pull ${{ matrix.base_image }}:${{ matrix.fedora_version }} - else - podman pull quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }} - fi + podman pull quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.fedora_version }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods:main-${{ matrix.fedora_version }} podman pull ${{ env.IMAGE_REGISTRY }}/main-kernel:${{ env.KERNEL_VERSION }} @@ -203,7 +204,6 @@ jobs: tags: | ${{ steps.generate-tags.outputs.alias_tags }} build-args: | - ${{ matrix.base_image && format('BASE_IMAGE={0}', matrix.base_image) || '' }} IMAGE_NAME=${{ matrix.image_name }} SOURCE_ORG=${{ env.SOURCE_ORG }} SOURCE_IMAGE=${{ env.SOURCE_IMAGE }} diff --git a/Containerfile b/Containerfile index 681dd3f3..3b86fecc 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,6 @@ ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-silverblue}" -ARG SOURCE_ORG="${SOURCE_ORG:-fedora-ostree-desktops}" +ARG SOURCE_ORG="${SOURCE_ORG:-fedora}" ARG BASE_IMAGE="quay.io/${SOURCE_ORG}/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.7-200.fc40.x86_64}" From 05addf304a9a8432af936cbc836c286c39057a55 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 20:06:40 +0000 Subject: [PATCH 6/9] fix: prefix source image names with "fedora-" --- .github/workflows/reusable-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index e7df13a0..07edbb0e 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,9 +43,9 @@ jobs: - image_name: vauxite source_org: fedora-ostree-desktops - image_name: sericea - source_image: sway-atomic + source_image: fedora-sway-atomic - image_name: onyx - source_image: budgie-atomic + source_image: fedora-budgie-atomic steps: # Checkout push-to-registry action GitHub repository @@ -58,7 +58,7 @@ jobs: if [[ -n "${{ matrix.source_image }}" ]]; then echo "SOURCE_IMAGE=${{ matrix.source_image }}" >> $GITHUB_ENV else - echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV + echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV fi if [[ -n "${{ matrix.source_org }}" ]]; then echo "SOURCE_ORG=${{ matrix.source_org }}" >> $GITHUB_ENV From a43dbe7dda8406f2bc9459f280479764c3c42024 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 20:14:37 +0000 Subject: [PATCH 7/9] fix: some hacks to work around different naming conventions --- .github/workflows/reusable-build.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 07edbb0e..327d2f56 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -55,13 +55,15 @@ jobs: - name: Matrix Variables shell: bash run: | - if [[ -n "${{ matrix.source_image }}" ]]; then - echo "SOURCE_IMAGE=${{ matrix.source_image }}" >> $GITHUB_ENV - else - echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV - fi - if [[ -n "${{ matrix.source_org }}" ]]; then + if [[ "${{ matrix.source_org }}" == "fedora-ostree-desktops" ]]; then + echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV echo "SOURCE_ORG=${{ matrix.source_org }}" >> $GITHUB_ENV + else + if [[ "${{ matrix.image_name }}" == fedora-* ]]; then + echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV + else + echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV + fi fi echo "IMAGE_NAME=${{ matrix.image_name }}-main" >> $GITHUB_ENV From 07920b029fca069e4f4a4ebc9b02d778e9cbdbcc Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 20:16:42 +0000 Subject: [PATCH 8/9] fix: check source_image for fedora- prefix --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 327d2f56..a7925381 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -59,7 +59,7 @@ jobs: echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV echo "SOURCE_ORG=${{ matrix.source_org }}" >> $GITHUB_ENV else - if [[ "${{ matrix.image_name }}" == fedora-* ]]; then + if [[ "${{ matrix.source_image }}" == fedora-* ]]; then echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV else echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV From 1ec625ec94a44c9f16b1fbd2e43c50e2bf90dfca Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Mon, 2 Dec 2024 20:18:21 +0000 Subject: [PATCH 9/9] fix: this should be it - use source_image if prefixed with fedora- --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index a7925381..836ba707 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -60,7 +60,7 @@ jobs: echo "SOURCE_ORG=${{ matrix.source_org }}" >> $GITHUB_ENV else if [[ "${{ matrix.source_image }}" == fedora-* ]]; then - echo "SOURCE_IMAGE=${{ matrix.image_name }}" >> $GITHUB_ENV + echo "SOURCE_IMAGE=${{ matrix.source_image }}" >> $GITHUB_ENV else echo "SOURCE_IMAGE=fedora-${{ matrix.image_name }}" >> $GITHUB_ENV fi