refactor(ci): stable-daily tagging (#1815)

This commit is contained in:
befanyt 2024-10-24 22:48:42 +02:00 committed by GitHub
parent 02975310c8
commit 14959e2ba7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 90 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"
@ -246,15 +256,18 @@ 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}")
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+=("${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}")
@ -291,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