fix: Generate latest tag for all version releases

Changed latest tag condition from is_default_branch to
github.ref_type == tag so that latest tag is created
whenever any version tag (v*) is pushed, regardless of branch.

This ensures that:
- docker pull ghcr.io/patrykiti/zen-mcp-server:latest works
- docker pull ghcr.io/patrykiti/zen-mcp-server:v4.0.8 works
- No more SHA-only tags as primary tags
This commit is contained in:
Patryk Ciechanski
2025-06-12 14:21:08 +02:00
parent a97955f604
commit 4272cf2ae7

View File

@@ -42,7 +42,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=latest,enable=${{ github.ref_type == 'tag' }}
type=sha,prefix=main-,enable=${{ github.event_name == 'repository_dispatch' }}
type=raw,value=pr-${{ github.event.client_payload.pr_number }},enable=${{ github.event_name == 'repository_dispatch' && github.event.client_payload.pr_number != '' }}