From 8e9a42340097df535b530c49820ac36fe8428f31 Mon Sep 17 00:00:00 2001 From: Julien Semaan Date: Sun, 16 Jan 2022 20:38:57 -0500 Subject: [PATCH] fix: tag with latest only when its config is true --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index bea704b..975e071 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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}?"