Skip to content

Commit e51e2a3

Browse files
committed
feat(prelaunch): v0.0.14 - add GHCR Accept header for manifest verification
- Add Accept header with OCI/Docker manifest content types to GHCR pull verification curl to handle registries returning different manifest formats
1 parent 5c6bd1e commit e51e2a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

phala-cloud-prelaunch-script/prelaunch.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
echo "----------------------------------------------"
2-
echo "Running Phala Cloud Pre-Launch Script v0.0.13"
2+
echo "Running Phala Cloud Pre-Launch Script v0.0.14"
33
echo "----------------------------------------------"
44
set -e
55

@@ -166,6 +166,7 @@ if [[ "$DOCKER_REGISTRY_TARGET" == "ghcr.io" && -n "$DSTACK_DOCKER_USERNAME" &&
166166
exit 1
167167
fi
168168
http_code=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $token" \
169+
-H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.docker.distribution.manifest.v2+json" \
169170
"https://ghcr.io/v2/${repo}/manifests/${tag}")
170171
if [[ "$http_code" != "200" ]]; then
171172
echo "ERROR: GHCR pull access denied for $img (HTTP $http_code)"

0 commit comments

Comments
 (0)