fix crane registry url

This commit is contained in:
ThetaDev
2024-03-02 19:51:08 +01:00
parent bb17b53eec
commit c6fa5d6f37

View File

@@ -2,9 +2,6 @@
set -e pipefail
if [ "$INPUT_DEBUG" = "true" ]; then
echo "environment:"
printenv
echo ""
set -x
fi
@@ -55,8 +52,9 @@ if [ "$REGISTRY" = "ghcr.io" ]; then
fi
if [ "$REGISTRY" = "docker.io" ]; then
REGISTRY="index.${REGISTRY}/v1/"
kanikoRegistry="index.docker.io/v1/"
else
kanikoRegistry="$REGISTRY"
IMAGE="${REGISTRY}/${IMAGE}"
if [ -n "$IMAGE_LATEST" ]; then
@@ -77,7 +75,7 @@ ARGS="$CACHE $CONTEXT $DOCKERFILE $TARGET $INPUT_EXTRA_ARGS"
cat <<EOF >/kaniko/.docker/config.json
{
"auths": {
"https://${REGISTRY}": {
"https://${kanikoRegistry}": {
"username": "${USERNAME}",
"password": "${PASSWORD}"
}