1
0
Fork 0
mirror of https://github.com/aevea/action-kaniko.git synced 2025-05-10 01:20:00 +02:00

feat: Allow stripping tag prefixes

This commit is contained in:
Alex Viscreanu 2020-02-24 22:11:13 +01:00
parent 4a68ad0e14
commit 6c131bc4a8
No known key found for this signature in database
GPG key ID: 60A6BD7F046C850B
3 changed files with 35 additions and 15 deletions

View file

@ -6,6 +6,7 @@ export IMAGE=${INPUT_IMAGE}
export BRANCH=$(echo ${GITHUB_REF} | sed -E "s/refs\/(heads|tags)\///g" | sed -e "s/\//-/g")
export TAG=${INPUT_TAG:-$([ "$BRANCH" == "master" ] && echo latest || echo $BRANCH)}
export TAG=${TAG:-"latest"}
export TAG=${TAG#$INPUT_STRIP_TAG_PREFIX}
export USERNAME=${INPUT_USERNAME:-$GITHUB_ACTOR}
export PASSWORD=${INPUT_PASSWORD:-$GITHUB_TOKEN}
export IMAGE=$IMAGE:$TAG