Skip to content

Commit 01a7e48

Browse files
fix(build-nix-image): only prepend v to release version if tag_base starts with a number
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
1 parent 43d944b commit 01a7e48

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/actions/build-nix-image/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ runs:
6565
echo "GIT_SHA_SHORT=$CI_GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT" >> $GITHUB_ENV
6666
elif [ -n "${{ inputs.releaseVersion }}" ]; then
6767
tag_base="${{ inputs.releaseVersion }}"
68-
tag="v$tag_base"
68+
69+
if [[ $tag_base =~ ^[0-9] ]]; then
70+
tag="v$tag_base"
71+
else
72+
tag="$tag_base"
73+
fi
6974
7075
sha=$(git rev-parse "$tag")
7176
short_sha=$(git rev-parse --short "$tag")

0 commit comments

Comments
 (0)