From f1e42b8444f4424672a11a33741a827eae02dfd1 Mon Sep 17 00:00:00 2001 From: Sean Eagan Date: Tue, 16 Mar 2021 15:29:37 -0500 Subject: [PATCH] Add `v` prefix to semver image tags This adds some context e.g. `v1` instead of just `1`, and matches what some nearby projects use, such as the kpt container functions [0]. [0]: https://github.com/GoogleContainerTools/kpt/issues/1358 Change-Id: I2026fba873a0f074233e7628de35e53f1f880027 Signed-off-by: Sean Eagan --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c2aa4b38f..4f42a0697 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -46,12 +46,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