chore(ci): fix possible empty version meta on image

This commit is contained in:
Kyle Gospodnetich 2024-02-05 22:36:47 -08:00
parent 59cbc71399
commit 17edc1b92f

View File

@ -183,6 +183,7 @@ jobs:
- name: Get Current Fedora Version
id: labels
shell: bash
run: |
if [[ "${{ matrix.base_name }}" == "bazzite-nvidia" ]]; then
ver=$(skopeo inspect docker://ghcr.io/ublue-os/bazzite-${{ env.IMAGE_FLAVOR }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
@ -191,6 +192,10 @@ jobs:
else
ver=$(skopeo inspect docker://ghcr.io/ublue-os/${{ matrix.base_image_name }}-${{ env.IMAGE_FLAVOR }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]')
fi
if [ -z "$ver" ] || [ "null" = "$ver" ]; then
echo "inspected image version must not be empty or null"
exit 1
fi
echo "VERSION=$ver" >> $GITHUB_OUTPUT
# Build metadata