Grab latest tag

This commit is contained in:
Antony Messerli 2023-06-10 13:29:06 -05:00 committed by GitHub
parent b9c8be37d7
commit fcfcbf034c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,11 +47,14 @@ jobs:
id: version_check
continue-on-error: true
run: |
tag=latest
IMAGE=netbootxyz/netbootxyz
TOKEN=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Anetbootxyz%2Fnetbootxyz%3Apull" \
| jq -r '.token')
TAG=$(curl -s --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${TOKEN}" \
"https://ghcr.io/v2/${IMAGE}/tags/list" \
| jq -r '.tags[-1]')
MULTIDIGEST=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${TOKEN}" \