From ac0527a3139f91b603d4197f397fee6ebc1df453 Mon Sep 17 00:00:00 2001 From: befanyt <172807209+befanyt@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:10:04 +0200 Subject: [PATCH 1/2] refactor(ci): stable-daily tagging --- .github/workflows/reusable-build.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 2c5ebd3e7fd..dc3ad014a92 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -246,15 +246,14 @@ jobs: COMMIT_TAGS+=("${SHA_SHORT}") fi + TODAY="$(date +%A)" if [[ ${{ matrix.fedora_version }} == "stable" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-daily" "${FEDORA_VERSION}-daily-${TIMESTAMP}") - if [[ ${{ github.event_name }} == "schedule" ]]; then - TODAY="$(date +%A)" - if [[ "${TODAY}" == "${{ inputs.weekly_tag_day }}" ]]; then - BUILD_TAGS+=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") - fi + if [[ ${{ github.event_name }} == "schedule" ]] && \ + [[ "${{ inputs.weekly_tag_day }}" != "${TODAY}" ]]; then + BUILD_TAGS+=("stable-daily" "stable-daily-${TIMESTAMP}") else - BUILD_TAGS+=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") + BUILD_TAGS+=("stable" "stable-${TIMESTAMP}") + BUILD_TAGS+=("stable-daily" "stable-daily-${TIMESTAMP}") fi else BUILD_TAGS=("${{ env.fedora_version }}" "${{ env.fedora_version }}-${TIMESTAMP}") From afa39c1a23b55ebedbc5bd3aef94205fe7d9af2b Mon Sep 17 00:00:00 2001 From: befanyt <172807209+befanyt@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:08:51 +0200 Subject: [PATCH 2/2] feat(ci): enable manual building of stable or stable-daily --- .../workflows/build-coreos-aurora-daily.yml | 16 +++++++++++++++ .../workflows/build-coreos-aurora-weekly.yml | 16 +++++++++++++++ .../workflows/build-coreos-bluefin-daily.yml | 17 ++++++++++++++++ .../workflows/build-coreos-bluefin-weekly.yml | 16 +++++++++++++++ .github/workflows/reusable-build.yml | 20 ++++++++++++++++++- 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-coreos-aurora-daily.yml create mode 100644 .github/workflows/build-coreos-aurora-weekly.yml create mode 100644 .github/workflows/build-coreos-bluefin-daily.yml create mode 100644 .github/workflows/build-coreos-bluefin-weekly.yml diff --git a/.github/workflows/build-coreos-aurora-daily.yml b/.github/workflows/build-coreos-aurora-daily.yml new file mode 100644 index 00000000000..b02939db44e --- /dev/null +++ b/.github/workflows/build-coreos-aurora-daily.yml @@ -0,0 +1,16 @@ +name: Aurora Stable Daily +on: + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: stable + rechunk: true + build_stable_daily: true + build_stable_weekly: false + diff --git a/.github/workflows/build-coreos-aurora-weekly.yml b/.github/workflows/build-coreos-aurora-weekly.yml new file mode 100644 index 00000000000..3611c0afaaf --- /dev/null +++ b/.github/workflows/build-coreos-aurora-weekly.yml @@ -0,0 +1,16 @@ +name: Aurora Stable Weekly +on: + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: stable + rechunk: true + build_stable_daily: false + build_stable_weekly: true + diff --git a/.github/workflows/build-coreos-bluefin-daily.yml b/.github/workflows/build-coreos-bluefin-daily.yml new file mode 100644 index 00000000000..d79e5c20499 --- /dev/null +++ b/.github/workflows/build-coreos-bluefin-daily.yml @@ -0,0 +1,17 @@ +name: Bluefin Stable Daily +on: + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: stable + rechunk: true + build_stable_daily: true + build_stable_weekly: false + + diff --git a/.github/workflows/build-coreos-bluefin-weekly.yml b/.github/workflows/build-coreos-bluefin-weekly.yml new file mode 100644 index 00000000000..57def2f05b1 --- /dev/null +++ b/.github/workflows/build-coreos-bluefin-weekly.yml @@ -0,0 +1,16 @@ +name: Bluefin Stable Weekly +on: + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: stable + rechunk: true + build_stable_daily: false + build_stable_weekly: true + diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index dc3ad014a92..2452754c417 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -20,6 +20,16 @@ on: required: false type: string default: Tuesday + build_stable_daily: + description: "Build with 'stable-daily' tag" + required: false + type: boolean + default: true + build_stable_weekly: + description: "Build with 'stable' tag" + required: false + type: boolean + default: true outputs: images: description: "An array of images built and pushed to the registry" @@ -251,6 +261,10 @@ jobs: if [[ ${{ github.event_name }} == "schedule" ]] && \ [[ "${{ inputs.weekly_tag_day }}" != "${TODAY}" ]]; then BUILD_TAGS+=("stable-daily" "stable-daily-${TIMESTAMP}") + elif [[ ${{ inputs.build_stable_daily }} == "false" ]]; then + BUILD_TAGS+=("stable" "stable-${TIMESTAMP}") + elif [[ ${{ inputs.build_stable_weekly }} == "false" ]]; then + BUILD_TAGS+=("stable-daily" "stable-daily-${TIMESTAMP}") else BUILD_TAGS+=("stable" "stable-${TIMESTAMP}") BUILD_TAGS+=("stable-daily" "stable-daily-${TIMESTAMP}") @@ -290,7 +304,11 @@ jobs: BUILD_TAGS+=("beta") echo "DEFAULT_TAG=beta" >> $GITHUB_ENV elif [[ "$IS_COREOS" == "true" ]]; then - echo "DEFAULT_TAG=stable-daily" >> $GITHUB_ENV + if [[ ${{ inputs.build_stable_daily }} == "true" ]]; then + echo "DEFAULT_TAG=stable-daily" >> $GITHUB_ENV + else + echo "DEFAULT_TAG=stable" >> $GITHUB_ENV + fi fi fi