mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-15 01:24:53 +00:00
fix: always get version tags (#134)
--------- Co-authored-by: Scott Ames <scott@ames.sh>
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -64,13 +64,19 @@ jobs:
|
||||
echo "FEDORA_MAJOR_VERSION=$(yq '.fedora-version' ./${{ matrix.recipe }})" >> $GITHUB_ENV
|
||||
echo "BASE_IMAGE_URL=$(yq '.base-image' ./${{ matrix.recipe }})" >> $GITHUB_ENV
|
||||
|
||||
- name: Get current version
|
||||
id: labels
|
||||
run: |
|
||||
ver=$(skopeo inspect docker://${{ env.BASE_IMAGE_URL }}:${{ env.FEDORA_MAJOR_VERSION }} | jq -r '.Labels["org.opencontainers.image.version"]')
|
||||
echo "VERSION=$ver" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate tags
|
||||
id: generate-tags
|
||||
shell: bash
|
||||
run: |
|
||||
# Generate a timestamp for creating an image version history
|
||||
TIMESTAMP="$(date +%Y%m%d)"
|
||||
MAJOR_VERSION="${{ env.FEDORA_MAJOR_VERSION }}"
|
||||
MAJOR_VERSION="$(echo ${{ steps.labels.outputs.VERSION }} | cut -d . -f 1)"
|
||||
COMMIT_TAGS=()
|
||||
BUILD_TAGS=()
|
||||
# Have tags for tracking builds during pull request
|
||||
@@ -98,12 +104,6 @@ jobs:
|
||||
done
|
||||
echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get current version
|
||||
id: labels
|
||||
run: |
|
||||
ver=$(skopeo inspect docker://${{ env.BASE_IMAGE_URL }}:${{ env.FEDORA_MAJOR_VERSION }} | jq -r '.Labels["org.opencontainers.image.version"]')
|
||||
echo "VERSION=$ver" >> $GITHUB_OUTPUT
|
||||
|
||||
# Build metadata
|
||||
- name: Image Metadata
|
||||
uses: docker/metadata-action@v4
|
||||
|
||||
Reference in New Issue
Block a user