@@ -108,25 +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 "Accept: application/vnd.oci.image.index.v1+json" \
114- --header "Authorization: Bearer ${token}" \
115- "https://ghcr.io/v2/${image}/manifests/${tag}" \
116- | jq -r 'first( .manifests[].digest)' )
117- digest=$(curl -s \
118- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
119- --header "Accept: application/vnd.oci.image.index .v1+json" \
120- --header "Authorization: Bearer ${token}" \
121- "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
122- | 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')
123123{% else %}
124- digest=$(curl -s \
125- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
126- --header "Accept: application/vnd.oci.image.index .v1+json" \
127- --header "Authorization: Bearer ${token}" \
128- "https://ghcr.io/v2/${image}/manifests/${tag}" \
129- | 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')
130130{% endif %}
131131 image_info=$(curl -sL \
132132 --header "Authorization: Bearer ${token}" \
0 commit comments