1
0
Fork 0
mirror of https://github.com/aevea/action-kaniko.git synced 2025-01-30 22:09:37 +01:00

fix: tag with latest only when its config is true

This commit is contained in:
Julien Semaan 2022-01-16 20:38:57 -05:00 committed by Alex
parent f16a14fc0f
commit 8e9a423400

View file

@ -10,10 +10,13 @@ export TAG=${TAG#$INPUT_STRIP_TAG_PREFIX}
export USERNAME=${INPUT_USERNAME:-$GITHUB_ACTOR}
export PASSWORD=${INPUT_PASSWORD:-$GITHUB_TOKEN}
export REPOSITORY=$IMAGE
export IMAGE_LATEST=${INPUT_TAG_WITH_LATEST:+"$IMAGE:latest"}
export IMAGE=$IMAGE:$TAG
export CONTEXT_PATH=${INPUT_PATH}
if [[ "$INPUT_TAG_WITH_LATEST" == "true" ]]; then
export IMAGE_LATEST="$IMAGE:latest"
fi
function ensure() {
if [ -z "${1}" ]; then
echo >&2 "Unable to find the ${2} variable. Did you set with.${2}?"