@@ -34,29 +34,36 @@ jobs:
3434
3535 - name : Check if stable release
3636 id : check-stable
37+ if : startsWith(github.ref, 'refs/tags/')
3738 run : |
3839 TAG_NAME="${GITHUB_REF#refs/tags/}"
40+ echo "Checking tag: $TAG_NAME"
41+
42+ # Only match vX.Y.Z format (no suffixes like rc, alpha, beta)
3943 if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
4044 echo "is_stable=true" >> $GITHUB_OUTPUT
41- echo "This is a stable release: $TAG_NAME"
45+ echo "This is a STABLE release: $TAG_NAME"
4246 else
4347 echo "is_stable=false" >> $GITHUB_OUTPUT
44- echo "This is a pre-release : $TAG_NAME"
48+ echo "This is a PRE-RELEASE : $TAG_NAME (will not update 'latest' or major.minor tags) "
4549 fi
4650
4751 - name : Extract metadata
4852 id : meta
4953 uses : docker/metadata-action@v5
5054 with :
5155 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
56+ flavor : |
57+ # Disable automatic 'latest' tag to have explicit control
58+ latest=false
5259 tags : |
5360 # For PRs: tag as pr-<number>
5461 type=ref,event=pr
55- # For tags: extract full version without 'v' prefix (e.g., 0.5.2 or 0.5.2rc3)
56- type=match,pattern=v(.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
62+ # For all tags: extract full version without 'v' prefix (e.g., 0.5.2 or 0.5.2rc3)
63+ type=match,pattern=v(.*),group=1
5764 # For stable releases only: extract major.minor (e.g., 0.5 from v0.5.2)
5865 type=match,pattern=v(\d+\.\d+),group=1,enable=${{ steps.check-stable.outputs.is_stable == 'true' }}
59- # Tag as 'latest' only for stable releases
66+ # For stable releases only: tag as 'latest'
6067 type=raw,value=latest,enable=${{ steps.check-stable.outputs.is_stable == 'true' }}
6168
6269 - name : Set build timestamp
0 commit comments