Skip to content

Commit

Permalink
fix: Strip refs/tags string from github ref
Browse files Browse the repository at this point in the history
  • Loading branch information
aexvir committed Feb 16, 2020
1 parent 6d863ae commit 4a68ad0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e pipefail

export REGISTRY=${INPUT_REGISTRY:-"docker.io"}
export IMAGE=${INPUT_IMAGE}
export BRANCH=$(echo ${GITHUB_REF} | sed -e "s/refs\/heads\///g" | sed -e "s/\//-/g")
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 USERNAME=${INPUT_USERNAME:-$GITHUB_ACTOR}
Expand Down

0 comments on commit 4a68ad0

Please sign in to comment.