Skip to content

Commit

Permalink
chore(ci): fix possible empty version meta on image (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherman authored Feb 6, 2024
1 parent c2ad2bf commit 43c383b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,14 @@ jobs:
- name: Get current version
id: labels
shell: bash
run: |
set -eo pipefail
ver=$(skopeo inspect docker://quay.io/${{ env.SOURCE_ORG }}/${{ env.SOURCE_IMAGE }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
if [ -z "$ver" ] || [ "null" = "$ver" ]; then
echo "inspected image version must not be empty or null"
exit 1
fi
echo "VERSION=$ver" >> $GITHUB_OUTPUT
# Generate image metadata
Expand Down

0 comments on commit 43c383b

Please sign in to comment.