Fix Docker tag format in build pipeline

Remove the prefix={{branch}}- from the sha tag type which was causing
invalid tag formats like ":-cbc2c2c" when building pull requests.
The {{branch}} placeholder becomes empty for PRs, leaving only the dash
prefix which creates an invalid Docker tag.

Changed from: type=sha,prefix={{branch}}-
Changed to: type=sha

This generates valid tags like "sha-cbc2c2c" for all events.
This commit is contained in:
Claude
2025-11-04 21:06:32 +00:00
parent d015f19967
commit 6c13692272

View File

@@ -60,7 +60,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image