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:
parent
f16a14fc0f
commit
8e9a423400
1 changed files with 4 additions and 1 deletions
|
@ -10,10 +10,13 @@ export TAG=${TAG#$INPUT_STRIP_TAG_PREFIX}
|
||||||
export USERNAME=${INPUT_USERNAME:-$GITHUB_ACTOR}
|
export USERNAME=${INPUT_USERNAME:-$GITHUB_ACTOR}
|
||||||
export PASSWORD=${INPUT_PASSWORD:-$GITHUB_TOKEN}
|
export PASSWORD=${INPUT_PASSWORD:-$GITHUB_TOKEN}
|
||||||
export REPOSITORY=$IMAGE
|
export REPOSITORY=$IMAGE
|
||||||
export IMAGE_LATEST=${INPUT_TAG_WITH_LATEST:+"$IMAGE:latest"}
|
|
||||||
export IMAGE=$IMAGE:$TAG
|
export IMAGE=$IMAGE:$TAG
|
||||||
export CONTEXT_PATH=${INPUT_PATH}
|
export CONTEXT_PATH=${INPUT_PATH}
|
||||||
|
|
||||||
|
if [[ "$INPUT_TAG_WITH_LATEST" == "true" ]]; then
|
||||||
|
export IMAGE_LATEST="$IMAGE:latest"
|
||||||
|
fi
|
||||||
|
|
||||||
function ensure() {
|
function ensure() {
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
echo >&2 "Unable to find the ${2} variable. Did you set with.${2}?"
|
echo >&2 "Unable to find the ${2} variable. Did you set with.${2}?"
|
||||||
|
|
Loading…
Reference in a new issue