Merge "Add v prefix to semver image tags"

This commit is contained in:
Zuul 2021-03-17 17:49:42 +00:00 committed by Gerrit Code Review
commit d407142498

View File

@ -48,12 +48,12 @@ jobs:
fi
if [[ "$TAG" =~ ^($TAG_PREFIX)?v?(([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?)$ ]]
then
TAGS="${BASH_REMATCH[2]}"
TAGS="v${BASH_REMATCH[2]}"
# Prereleases don't count as major and minor
if [[ -z ${BASH_REMATCH[6]} ]]
then
MINOR_TAG="${BASH_REMATCH[3]}.${BASH_REMATCH[4]}"
MAJOR_TAG="${BASH_REMATCH[3]}"
MINOR_TAG="v${BASH_REMATCH[3]}.${BASH_REMATCH[4]}"
MAJOR_TAG="v${BASH_REMATCH[3]}"
TAGS="$TAGS $MINOR_TAG $MAJOR_TAG"
fi
echo ::set-output name=IMG::$IMG