fix(ci): use match pattern for Docker tags to support 2-part versions
The semver pattern in docker/metadata-action requires 3-part versions (e.g. v0.29.0). Our tags use 2-part (v0.29), causing the metadata step to produce empty tags, which made build-push-action fail. Fix: use type=match with regex to extract the version string directly, plus type=raw for the latest tag unconditionally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
1605d65226
commit
1a579ef9cf
1 file changed
+2
-3
@@ -40,9 +40,8 @@ jobs:
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=match,pattern=v(.*),group=1
|
||||
type=raw,value=latest
|
||||
|
||||
# Build and push multi-arch image (amd64 + arm64)
|
||||
- name: Build and push Docker image
|
||||
|
||||
Reference in new issue
Block a user