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 committed by Jacob Taylor
parent 3d27cce047
commit 8269a2fd1c

View file

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