🐛 Remove reference to non-capturing group

Non-capturing groups don't exist in PCRE syntax, that is used by normal
sed (non-busybox) on the default GitHub actions runner.
Fixes https://github.com/elgohr/Publish-Docker-Github-Action/issues/155
This commit is contained in:
Lars Gohr
2022-04-13 20:49:56 +02:00
parent 3e8e688b9f
commit a28c5ceb1c
2 changed files with 11 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ translateDockerTag() {
if isPreRelease "${GITHUB_REF}"; then
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/g")
else
TAGS=$(echo "${GITHUB_REF}" | sed -e "s/refs\/tags\///g" | sed -E "s/v?([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.\3\4 \1.\2\4 \1\4/g")
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")
fi
elif isGitTag && usesBoolean "${INPUT_TAG_NAMES}"; then
TAGS=$(echo "${GITHUB_REF}" | sed -e "s/refs\/tags\///g")