Skip to content

Commit

Permalink
fix: tag with latest only when its config is true
Browse files Browse the repository at this point in the history
  • Loading branch information
julsemaan authored and aexvir committed Jan 24, 2022
1 parent f16a14f commit 8e9a423
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}?"
Expand Down

0 comments on commit 8e9a423

Please sign in to comment.