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