@@ -108,22 +108,25 @@ jobs:
108108 "https://ghcr.io/token?scope=repository%3A{{ better_vars.LS_USER }}%2F{{ project_name }}%3Apull" \
109109 | jq -r '.token')
110110{% if better_vars .MULTIARCH == 'true' %}
111- multidigest=$(curl -s \
112- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
113- --header "Authorization: Bearer ${token}" \
114- "https://ghcr.io/v2/${image}/manifests/${tag}" \
115- | jq -r 'first(.manifests[].digest)')
116- digest=$(curl -s \
117- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
118- --header "Authorization: Bearer ${token}" \
119- "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
120- | jq -r '.config.digest')
111+ multidigest=$(curl -s \
112+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
113+ --header "Accept: application/vnd.oci.image.index.v1+json" \
114+ --header "Authorization: Bearer ${token}" \
115+ "https://ghcr.io/v2/${image}/manifests/${tag}")
116+ multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
117+ digest=$(curl -s \
118+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
119+ --header "Accept: application/vnd.oci.image.manifest.v1+json" \
120+ --header "Authorization: Bearer ${token}" \
121+ "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
122+ | jq -r '.config.digest')
121123{% else %}
122- digest=$(curl -s \
123- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
124- --header "Authorization: Bearer ${token}" \
125- "https://ghcr.io/v2/${image}/manifests/${tag}" \
126- | jq -r '.config.digest')
124+ digest=$(curl -s \
125+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
126+ --header "Accept: application/vnd.oci.image.manifest.v1+json" \
127+ --header "Authorization: Bearer ${token}" \
128+ "https://ghcr.io/v2/${image}/manifests/${tag}" \
129+ | jq -r '.config.digest')
127130{% endif %}
128131 image_info=$(curl -sL \
129132 --header "Authorization: Bearer ${token}" \
0 commit comments