Fix Docker image push condition to exclude merge queue

The push condition only excluded pull_request events, causing
the builder to attempt a push on merge_group events too.

Since no meta-tag rule matches merge_group, this results in
a push with no tag, which fails or produces a broken image.

Now only pushes on branch/tag push and workflow_dispatch.
This commit is contained in:
vlakoff 2026-04-30 09:50:55 +02:00
parent 980d5dcd1e
commit ccbd2f971c
No known key found for this signature in database
GPG key ID: D01DA5A5B698E332

View file

@ -36,7 +36,7 @@ jobs:
context: . # Use local checkout to support GitHub Merge Queue
output: image
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
cache: ${{ github.event_name != 'workflow_dispatch' || inputs.use_cache }}
# We don't sign the image because ghcr.io doesn't support OCI Referrers API yet, and the fallback relies on pushing new tags on each build
# https://github.com/docker/github-builder/issues/109#issuecomment-3885082486