This commit is contained in:
Lars Gohr
2020-03-24 19:48:01 +01:00
parent 2da252bbb1
commit b2f63259b4
2 changed files with 25 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ function translateDockerTag() {
elif isOnMaster; then
TAGS="latest"
elif isGitTag && usesBoolean "${INPUT_TAG_SEMVER}" && isSemver "${GITHUB_REF}"; then
TAGS=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g" | sed -E "s/v?([0-9]+)\.([0-9+])\.([0-9]+)/\1.\2.\3 \1.\2 \1/g")
TAGS=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g" | sed -E "s/v?([0-9]+)\.([0-9+])\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?/\1.\2.\3\4 \1.\2\4 \1\4/g")
elif isGitTag && usesBoolean "${INPUT_TAG_NAMES}"; then
TAGS=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g")
elif isGitTag; then
@@ -132,7 +132,7 @@ function usesBoolean() {
}
function isSemver() {
echo "${1}" | grep -Eq '^refs/tags/v?([0-9]+)\.([0-9+])\.([0-9]+)$'
echo "${1}" | grep -Eq '^refs/tags/v?([0-9]+)\.([0-9+])\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?$'
}
function useSnapshot() {