We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb2808b commit c79c516Copy full SHA for c79c516
1 file changed
.github/workflows/docker-build.yml
@@ -6,7 +6,6 @@ on:
6
branch:
7
description: 'Branch to build from'
8
required: true
9
- default: 'release-v1'
10
type: string
11
tag_as_latest:
12
description: 'Tag image as latest'
@@ -24,13 +23,13 @@ jobs:
24
23
with:
25
ref: ${{ inputs.branch }}
26
27
- - name: Get latest tag
+ - name: Get latest version tag
28
id: get-tag
29
run: |
30
git fetch --tags
31
- LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
+ LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-version:refname | head -1)
32
if [ -z "$LATEST_TAG" ]; then
33
- echo "No tags found on branch ${{ inputs.branch }}"
+ echo "No version tags found on branch ${{ inputs.branch }}"
34
exit 1
35
fi
36
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
0 commit comments