Merge pull request #15 from ublue-os/pr-cid
feat: tag PR builds independently from matrix.version, latest, and stable
This commit is contained in:
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -33,15 +33,21 @@ jobs:
|
||||
id: generate-tags
|
||||
shell: bash
|
||||
run: |
|
||||
echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
|
||||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
alias_tags=()
|
||||
if [[ "${{ matrix.is_latest }}" == "true" ]]; then
|
||||
alias_tags+=("latest")
|
||||
fi
|
||||
if [[ "${{ matrix.is_stable }}" == "true" ]]; then
|
||||
alias_tags+=("stable")
|
||||
# Only perform the follow code when the action is spawned from a Pull Request
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
alias_tags+=("pr-${{ github.event.number }}")
|
||||
else
|
||||
# The following is run when the timer is triggered or a merge/push to main
|
||||
echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
|
||||
alias_tags+=("${{ matrix.major_version }}")
|
||||
if [[ "${{ matrix.is_latest }}" == "true" ]]; then
|
||||
alias_tags+=("latest")
|
||||
fi
|
||||
if [[ "${{ matrix.is_stable }}" == "true" ]]; then
|
||||
alias_tags+=("stable")
|
||||
fi
|
||||
fi
|
||||
echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -57,7 +63,6 @@ jobs:
|
||||
${{ steps.generate-tags.outputs.alias_tags }}
|
||||
${{ steps.generate-tags.outputs.date }}
|
||||
${{ steps.generate-tags.outputs.sha_short }}
|
||||
${{ matrix.major_version }}
|
||||
build-args: |
|
||||
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
|
||||
oci: true
|
||||
|
||||
Reference in New Issue
Block a user