chore: tidy tag gen, use correct major ver

This commit is contained in:
ER
2023-04-03 16:34:10 +03:00
parent 250c1242c7
commit 4527295bb7

View File

@@ -56,26 +56,18 @@ jobs:
run: | run: |
# Generate a timestamp for creating an image version history # Generate a timestamp for creating an image version history
TIMESTAMP="$(date +%Y%m%d)" TIMESTAMP="$(date +%Y%m%d)"
MAJOR_VERSION="${{ matrix.major_version }}" MAJOR_VERSION="${{ env.FEDORA_MAJOR_VERSION }}"
COMMIT_TAGS=() COMMIT_TAGS=()
BUILD_TAGS=() BUILD_TAGS=()
# Have tags for tracking builds during pull request # Have tags for tracking builds during pull request
SHA_SHORT="$(git rev-parse --short HEAD)" SHA_SHORT="$(git rev-parse --short HEAD)"
COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}") COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}")
COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}") COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}")
if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
[[ "${{ matrix.is_stable_version }}" == "true" ]]; then
COMMIT_TAGS+=("pr-${{ github.event.number }}")
COMMIT_TAGS+=("${SHA_SHORT}")
fi
BUILD_TAGS=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}") BUILD_TAGS=("${MAJOR_VERSION}" "${MAJOR_VERSION}-${TIMESTAMP}")
if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
[[ "${{ matrix.is_stable_version }}" == "true" ]]; then
BUILD_TAGS+=("${TIMESTAMP}") BUILD_TAGS+=("${TIMESTAMP}")
BUILD_TAGS+=("latest") BUILD_TAGS+=("latest")
fi
if [[ "${{ github.event_name }}" == "pull_request" ]]; then if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "Generated the following commit tags: " echo "Generated the following commit tags: "