From 4a68ad0e14f3a6180bb9c5aadc4b5d208c54b861 Mon Sep 17 00:00:00 2001 From: Alex Viscreanu Date: Mon, 17 Feb 2020 00:11:52 +0100 Subject: [PATCH] fix: Strip refs/tags string from github ref --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index a44f977..971d75b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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}