@@ -44,16 +44,18 @@ jobs:
44
44
token=$(curl -sX GET \
45
45
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fwireguard%3Apull" \
46
46
| jq -r '.token')
47
- multidigest=$(curl -s \
48
- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
49
- --header "Authorization: Bearer ${token}" \
50
- "https://ghcr.io/v2/${image}/manifests/${tag}" \
51
- | jq -r 'first(.manifests[].digest)')
52
- digest=$(curl -s \
53
- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
54
- --header "Authorization: Bearer ${token}" \
55
- "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
56
- | jq -r '.config.digest')
47
+ multidigest=$(curl -s \
48
+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
49
+ --header "Accept: application/vnd.oci.image.index.v1+json" \
50
+ --header "Authorization: Bearer ${token}" \
51
+ "https://ghcr.io/v2/${image}/manifests/${tag}")
52
+ multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
53
+ digest=$(curl -s \
54
+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
55
+ --header "Accept: application/vnd.oci.image.manifest.v1+json" \
56
+ --header "Authorization: Bearer ${token}" \
57
+ "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
58
+ | jq -r '.config.digest')
57
59
image_info=$(curl -sL \
58
60
--header "Authorization: Bearer ${token}" \
59
61
"https://ghcr.io/v2/${image}/blobs/${digest}")
0 commit comments