We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b016e8 commit 837e3beCopy full SHA for 837e3be
1 file changed
.github/workflows/docker-push.yml
@@ -37,6 +37,21 @@ jobs:
37
username: ${{ github.actor }}
38
password: ${{ secrets.GITHUB_TOKEN }}
39
40
+ - name: Checkout the latest tag
41
+ run: |
42
+ rev=$(git rev-list --tags --max-count=1)
43
+ tag=$(git describe --tags "$rev")
44
+
45
+ if [[ -z "$tag" ]] ; then
46
+ echo "::error::Can't find the latest tag"
47
+ exit 1
48
+ fi
49
50
+ echo -e "\033[34mRev:\033[0m $rev"
51
+ echo -e "\033[34mTag:\033[0m $tag"
52
53
+ git checkout "$tag"
54
55
- name: Prepare metadata for build
56
id: metadata
57
run: |
0 commit comments