fix: bash syntax doesn't work with sh

This commit is contained in:
ange 2024-11-14 22:58:18 +08:00
parent 9c6fbdafc8
commit b79e752979
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

View File

@ -13,7 +13,10 @@ cat <<EOF > /kaniko/.docker/config.json
}
EOF
[ -z "$IMAGEAPP" ] && IMAGEAPP="$${REGISTRY#*://}/$INPUT_IMAGE"
if [ -z "$IMAGEAPP" ]; then
REGISTRY="$(echo "$GITHUB_SERVER_URL" | sed 's .*:// ')"
IMAGEAPP="$REGISTRY/$INPUT_IMAGE"
fi
/kaniko/executor \
--cache="${INPUT_CACHE}" \