From 3e63daf6fed2cbc94479052d73807cbd30bbce4b Mon Sep 17 00:00:00 2001 From: Remon Oldenbeuving Date: Tue, 7 Apr 2020 11:39:12 +0200 Subject: [PATCH] fix: Ensure lowercase GitHub image namespace --- entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 76ce8fd..ddfa1d8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,10 +25,11 @@ sanitize "${IMAGE}" "image" sanitize "${TAG}" "tag" if [ "$REGISTRY" == "docker.pkg.github.com" ]; then - export IMAGE="$GITHUB_REPOSITORY/$IMAGE" + IMAGE_NAMESPACE="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" + export IMAGE="$IMAGE_NAMESPACE/$IMAGE" if [ ! -z $INPUT_CACHE_REGISTRY ]; then - export INPUT_CACHE_REGISTRY="$REGISTRY/$GITHUB_REPOSITORY/$INPUT_CACHE_REGISTRY" + export INPUT_CACHE_REGISTRY="$REGISTRY/$IMAGE_NAMESPACE/$INPUT_CACHE_REGISTRY" fi fi