Skip to content

Commit 4044615

Browse files
Bot Updating Templated Files
1 parent 317a5af commit 4044615

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/external_trigger.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,18 @@ jobs:
4444
token=$(curl -sX GET \
4545
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fwireguard%3Apull" \
4646
| 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')
5759
image_info=$(curl -sL \
5860
--header "Authorization: Bearer ${token}" \
5961
"https://ghcr.io/v2/${image}/blobs/${digest}")

0 commit comments

Comments
 (0)