From af758c029bf9d04ba4777a3da2db02013db937fc Mon Sep 17 00:00:00 2001 From: befanyt <172807209+befanyt@users.noreply.github.com> Date: Sun, 10 Nov 2024 16:03:31 +0100 Subject: [PATCH] fix: stable tag on schedule (#1919) Co-authored-by: m2 <69128853+m2Giles@users.noreply.github.com> --- .github/workflows/build-image-beta.yml | 2 +- .github/workflows/build-image-gts.yml | 4 ++-- .github/workflows/build-image-latest.yml | 4 ++-- .github/workflows/build-image-stable.yml | 4 ++-- .github/workflows/reusable-build.yml | 12 +++--------- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-image-beta.yml b/.github/workflows/build-image-beta.yml index f82d29c8538..55c63a8dbbc 100644 --- a/.github/workflows/build-image-beta.yml +++ b/.github/workflows/build-image-beta.yml @@ -38,7 +38,7 @@ jobs: generate-release: name: Generate Release needs: [build-image-beta] - if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.scheduled == '40 4 * * 0' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.schedule == '40 4 * * 0' secrets: inherit uses: ./.github/workflows/generate-release.yml with: diff --git a/.github/workflows/build-image-gts.yml b/.github/workflows/build-image-gts.yml index fecad3d02c6..55b88a1e0f1 100644 --- a/.github/workflows/build-image-gts.yml +++ b/.github/workflows/build-image-gts.yml @@ -27,7 +27,7 @@ jobs: generate_release: name: Generate Release needs: [build-image-gts] - if: github.event_name == 'scheduled' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' secrets: inherit uses: ./.github/workflows/generate-release.yml with: @@ -36,6 +36,6 @@ jobs: build-iso-gts: name: Build GTS ISOs needs: [build-image-gts] - if: github.event_name == 'scheduled' + if: github.event_name == 'schedule' secrets: inherit uses: ./.github/workflows/build-iso-gts.yml diff --git a/.github/workflows/build-image-latest.yml b/.github/workflows/build-image-latest.yml index 12eafedf522..01792af0e50 100644 --- a/.github/workflows/build-image-latest.yml +++ b/.github/workflows/build-image-latest.yml @@ -39,7 +39,7 @@ jobs: generate-release: name: Generate Release needs: [build-image-latest] - if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.scheduled == '40 4 * * 0' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.schedule == '40 4 * * 0' secrets: inherit uses: ./.github/workflows/generate-release.yml with: @@ -48,6 +48,6 @@ jobs: build-iso-latest: name: Build Latest ISOs needs: [build-image-latest] - if: github.event_name.scheduled == '40 4 * * 0' + if: github.event_name.schedule == '40 4 * * 0' secrets: inherit uses: ./.github/workflows/build-iso-latest.yml diff --git a/.github/workflows/build-image-stable.yml b/.github/workflows/build-image-stable.yml index 822bc2a8624..2e32bb3c77c 100644 --- a/.github/workflows/build-image-stable.yml +++ b/.github/workflows/build-image-stable.yml @@ -38,7 +38,7 @@ jobs: generate-release: name: Generate Release needs: [build-image-stable] - if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.scheduled == '45 5 * * 0' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name.schedule == '45 5 * * 0' secrets: inherit uses: ./.github/workflows/generate-release.yml with: @@ -47,6 +47,6 @@ jobs: build-iso-stable: name: Build Stable ISOs needs: [build-image-stable] - if: github.event_name.scheduled == '45 5 * * 0' + if: github.event_name.schedule == '45 5 * * 0' secrets: inherit uses: ./.github/workflows/build-iso-stable.yml diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 69fd9a6860e..2ad478f7355 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -99,14 +99,8 @@ jobs: fi # Kernel Release for ostree.linux label - if [[ "${{ matrix.image_flavor }}" =~ hwe ]]; then - kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/bazzite-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]') - elif [[ "${{ matrix.stream_name }}" =~ latest|beta ]]; then - kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/main-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]') - else - kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/coreos-stable-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]') - fi - + kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.AKMODS_FLAVOR }}-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]') + # Get Version ver=$(skopeo inspect docker://ghcr.io/ublue-os/"${{ env.BASE_IMAGE_NAME }}"-main:"${fedora_version}" | jq -r '.Labels["org.opencontainers.image.version"]') if [ -z "$ver" ] || [ "null" = "$ver" ]; then @@ -189,7 +183,7 @@ jobs: fi # Weekly Stable / Rebuild Stable on workflow_dispatch - if [[ "${{ matrix.stream_name }}" =~ "stable" && "${WEEKLY}" == "${TODAY}" && "${{ github.event_name }}" =~ scheduled ]]; then + if [[ "${{ matrix.stream_name }}" =~ "stable" && "${WEEKLY}" == "${TODAY}" && "${{ github.event_name }}" =~ schedule ]]; then BUILD_TAGS+=("stable" "stable-${TIMESTAMP}") elif [[ "${{ matrix.stream_name }}" =~ "stable" && "${{ github.event_name }}" =~ workflow_dispatch|workflow_call ]]; then BUILD_TAGS+=("stable" "stable-${TIMESTAMP}")