From dc591110ccb8df6e5876d0d526c564f4408757ad Mon Sep 17 00:00:00 2001 From: Alex Viscreanu Date: Mon, 21 Feb 2022 15:19:19 +0100 Subject: [PATCH] fix: update github container registry host --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 975e071..e124bfb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,7 +31,7 @@ ensure "${IMAGE}" "image" ensure "${TAG}" "tag" ensure "${CONTEXT_PATH}" "path" -if [ "$REGISTRY" == "docker.pkg.github.com" ]; then +if [ "$REGISTRY" == "ghcr.io" ]; then IMAGE_NAMESPACE="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" export IMAGE="$IMAGE_NAMESPACE/$IMAGE" export REPOSITORY="$IMAGE_NAMESPACE/$REPOSITORY" @@ -91,8 +91,8 @@ EOF if [ ! -z $INPUT_SKIP_UNCHANGED_DIGEST ]; then export DIGEST=$(cat digest) - if [ "$REGISTRY" == "docker.pkg.github.com" ]; then - wget -q -O manifest --header "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64 | tr -d \\n)" https://docker.pkg.github.com/v2/$REPOSITORY/manifests/latest || true + if [ "$REGISTRY" == "ghcr.io" ]; then + wget -q -O manifest --header "Authorization: Basic $(echo -n $USERNAME:$PASSWORD | base64 | tr -d \\n)" https://ghcr.io/v2/$REPOSITORY/manifests/latest || true export REMOTE="sha256:$(cat manifest | sha256sum | awk '{ print $1 }')" else export REMOTE=$(reg digest -u $USERNAME -p $PASSWORD $REGISTRY/$REPOSITORY | tail -1)