feat: tag PR builds independently from matrix.version, latest, and stable
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -37,12 +37,17 @@ jobs:
|
|||||||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
alias_tags=()
|
alias_tags=()
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
alias_tags+=("pr-${{ github.event.number }}")
|
||||||
|
else
|
||||||
|
alias_tags+=("${{ matrix.major_version }}")
|
||||||
if [[ "${{ matrix.is_latest }}" == "true" ]]; then
|
if [[ "${{ matrix.is_latest }}" == "true" ]]; then
|
||||||
alias_tags+=("latest")
|
alias_tags+=("latest")
|
||||||
fi
|
fi
|
||||||
if [[ "${{ matrix.is_stable }}" == "true" ]]; then
|
if [[ "${{ matrix.is_stable }}" == "true" ]]; then
|
||||||
alias_tags+=("stable")
|
alias_tags+=("stable")
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT
|
echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Build image using Buildah action
|
# Build image using Buildah action
|
||||||
@@ -57,7 +62,6 @@ jobs:
|
|||||||
${{ steps.generate-tags.outputs.alias_tags }}
|
${{ steps.generate-tags.outputs.alias_tags }}
|
||||||
${{ steps.generate-tags.outputs.date }}
|
${{ steps.generate-tags.outputs.date }}
|
||||||
${{ steps.generate-tags.outputs.sha_short }}
|
${{ steps.generate-tags.outputs.sha_short }}
|
||||||
${{ matrix.major_version }}
|
|
||||||
build-args: |
|
build-args: |
|
||||||
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
|
FEDORA_MAJOR_VERSION=${{ matrix.major_version }}
|
||||||
oci: true
|
oci: true
|
||||||
|
|||||||
Reference in New Issue
Block a user