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