Skip to content

Commit 8b7bca2

Browse files
authored
fix: select latest release tag for Docker rebuild workflow (#635)
1 parent dcbd096 commit 8b7bca2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ jobs:
2626

2727
- name: Checkout latest tag
2828
run: |
29-
export LATEST_TAG=`git describe --tags --abbrev=0`
29+
export LATEST_TAG=$(git tag --list 'v*' --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
30+
if [ -z "$LATEST_TAG" ]; then
31+
echo "No release tag found"
32+
exit 1
33+
fi
3034
git checkout $LATEST_TAG
3135
3236
- name: Set up Go ${{ steps.dotenv.outputs.go_version }}

0 commit comments

Comments
 (0)