From fcfcbf034c15d18755a1db8e14d5e48282e55e7c Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Sat, 10 Jun 2023 13:29:06 -0500 Subject: [PATCH] Grab latest tag --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee162fe..0086a2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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}" \