Skip to content

Commit e6d21f7

Browse files
author
Raffael Herrmann
committed
Fix tag detection to properly handle pre-release tags like v1.0.0-rc.1
1 parent c79c516 commit e6d21f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
id: get-tag
2828
run: |
2929
git fetch --tags
30-
LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-version:refname | head -1)
30+
LATEST_TAG=$(git tag | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?$' | sort -V | tail -1)
3131
if [ -z "$LATEST_TAG" ]; then
3232
echo "No version tags found on branch ${{ inputs.branch }}"
3333
exit 1

0 commit comments

Comments
 (0)