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:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -40,9 +40,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}
|
images: ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=match,pattern=v(.*),group=1
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=raw,value=latest
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
# Build and push multi-arch image (amd64 + arm64)
|
# Build and push multi-arch image (amd64 + arm64)
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
|||||||
Reference in New Issue
Block a user