|
64 | 64 | with: |
65 | 65 | images: ${{ inputs.image }} |
66 | 66 | tags: | |
67 | | - # vX.Y.Z -> X.Y.Z and X.Y (strip leading "v") |
68 | | - type=semver,pattern={{version}},prefix=v |
69 | | - type=semver,pattern={{major}}.{{minor}},prefix=v |
| 67 | + # vX.Y.Z -> X.Y.Z and X.Y (strip leading "v" if present) |
| 68 | + type=semver,pattern={{version}},value={{tag}},match=^v?(.+)$ |
| 69 | + type=semver,pattern={{major}}.{{minor}},value={{tag}},match=^v?(.+)$ |
70 | 70 | # latest on main and on v-tags |
71 | 71 | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} |
72 | 72 | # branch tag for non-PR branches |
@@ -119,8 +119,8 @@ jobs: |
119 | 119 | with: |
120 | 120 | images: ${{ inputs.image }} |
121 | 121 | tags: | |
122 | | - type=semver,pattern={{version}},prefix=v |
123 | | - type=semver,pattern={{major}}.{{minor}},prefix=v |
| 122 | + type=semver,pattern={{version}},value={{tag}},match=^v?(.+)$ |
| 123 | + type=semver,pattern={{major}}.{{minor}},value={{tag}},match=^v?(.+)$ |
124 | 124 | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} |
125 | 125 | type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }} |
126 | 126 | type=sha,format=short |
|
0 commit comments