ci: Only prefix non-default branches

AKA, tag image:main as the latest commit
This commit is contained in:
Jade Ellis 2025-04-17 15:44:56 +01:00
parent fb793e8315
commit 71d2421f55
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2

View file

@ -209,7 +209,7 @@ jobs:
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.0.') }}
type=semver,pattern=v{{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=ref,event=branch,prefix=branch-
type=ref,event=branch,prefix=${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref && '' || 'branch-' }}
type=ref,event=pr
type=sha,format=long
images: ${{needs.define-variables.outputs.images}}