Skip to content

Commit e54f8f0

Browse files
committed
Use lowercase repo as the docker tag
GitHub Packages (just like Docker Hub) doesn't allow repos containing uppercase chars. There is also no need to use string concatenation.
1 parent 1c1730a commit e54f8f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/build_and_push.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ fi
4848
# Image Push location
4949
REGISTRY=${REGISTRY:-"ghcr.io"}
5050
IMAGE_REPOSITORY=${IMAGE_NAME:-$GITHUB_REPOSITORY}
51-
IMAGE_LOCATION=$REGISTRY/$IMAGE_REPOSITORY
51+
IMAGE_LOCATION=$(echo "$REGISTRY/$IMAGE_REPOSITORY" | tr '[:upper:]' '[:lower:]')
5252

5353
TAG="$IMAGE_LOCATION:py${PUBLISH_TARGET}-${PACKAGE_VERSION}"
5454

5555
TAGS=" -t $TAG"
5656

5757
# For the latest version we do extra stuff.
5858
if [[ ! -z $PACKAGE_LATEST_VERSION ]] && [[ $PACKAGE_LATEST_VERSION = $PACKAGE_VERSION ]]; then
59-
TAGS+=" -t $IMAGE_LOCATION:py${PUBLISH_TARGET}-LATEST"
59+
TAGS=" -t $IMAGE_LOCATION:py${PUBLISH_TARGET}-LATEST"
6060

6161
VERSION_SHORTER=$(echo $PACKAGE_VERSION | cut -d"." -f1,2)
62-
TAGS+=" -t $IMAGE_LOCATION:py${PUBLISH_TARGET}-${VERSION_SHORTER}"
62+
TAGS=" -t $IMAGE_LOCATION:py${PUBLISH_TARGET}-${VERSION_SHORTER}"
6363

6464
VERSION_SHORTERER=$(echo $PACKAGE_VERSION | cut -d"." -f1)
6565
if [[ $VERSION_SHORTERER != "0" ]]; then
66-
TAGS+=" -t $IMAGE_LOCATION:py${PUBLISH_TARGET}-${VERSION_SHORTERER}"
66+
TAGS=" -t $IMAGE_LOCATION:py${PUBLISH_TARGET}-${VERSION_SHORTERER}"
6767
fi
6868
fi
6969

0 commit comments

Comments
 (0)