When dependabot-auto-merge merges a PR using GITHUB_TOKEN, GitHub suppresses the resulting push event on main — so docker-build-push.yml never fires. This explains why Docker publishes stopped after the auto-merge workflow was introduced.
Changes
docker-build-push.yml: Add pull_request: types: [closed] trigger — the pull_request closed event is fired by GitHub's infrastructure regardless of who performed the merge, bypassing the GITHUB_TOKEN push-suppression
Add job-level if guard to skip PRs that were closed without merging
on:push:branches:[main]pull_request:branches:[main]types:[closed] # fires even when merged via GITHUB_TOKENjobs:build-and-push:if:github.event_name != 'pull_request' || github.event.pull_request.merged == true
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.
When `dependabot-auto-merge` merges a PR using `GITHUB_TOKEN`, GitHub suppresses the resulting `push` event on `main` — so `docker-build-push.yml` never fires. This explains why Docker publishes stopped after the auto-merge workflow was introduced.
## Changes
- **`docker-build-push.yml`**: Add `pull_request: types: [closed]` trigger — the `pull_request` closed event is fired by GitHub's infrastructure regardless of who performed the merge, bypassing the `GITHUB_TOKEN` push-suppression
- Add job-level `if` guard to skip PRs that were closed without merging
```yaml
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [closed] # fires even when merged via GITHUB_TOKEN
jobs:
build-and-push:
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
```
<!-- START COPILOT CODING AGENT TIPS -->
---
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with [Raycast](https://gh.io/cca-raycast-docs).
changed title from {-[WIP] Add-} image publish{-ing-} on {-commits and PR merges to main-} to {+Verify: Docker+} image publish on {+every main push/merge is already implemented+}
changed title from **{-[WIP] Add-} image publish{-ing-} on {-commits and PR merges to main-}** to **{+Verify: Docker+} image publish on {+every main push/merge is already implemented+}**
changed title from {-Verify:-} Docker {-image -}publish {-on every main push/merge is already implemented-} to {+Fix+} Docker publish {+not triggering after GITHUB_TOKEN-merged PRs+}
changed title from **{-Verify:-} Docker {-image -}publish {-on every main push/merge is already implemented-}** to **{+Fix+} Docker publish {+not triggering after GITHUB_TOKEN-merged PRs+}**
With the new pull_request (closed) execution path, the workflow’s ref/sha context is no longer the main branch push. As written, actions/checkout will check out the PR ref by default and docker/metadata-action tag generation (type=ref,event=branch and enable={{is_default_branch}}) is likely to produce different tags than the push-to-main path (e.g., not updating the main/latest tags). This means the added trigger may still not publish the tags you expect for mainline builds.
To make the PR-closed path equivalent to the main push path, explicitly build from the merged commit on main (or github.event.pull_request.merge_commit_sha) and ensure metadata/tag computation targets main/default-branch tagging when the PR was merged into main.
With the new `pull_request` (closed) execution path, the workflow’s ref/sha context is no longer the `main` branch push. As written, `actions/checkout` will check out the PR ref by default and `docker/metadata-action` tag generation (`type=ref,event=branch` and `enable={{is_default_branch}}`) is likely to produce different tags than the `push`-to-`main` path (e.g., not updating the `main`/`latest` tags). This means the added trigger may still not publish the tags you expect for mainline builds.
To make the PR-closed path equivalent to the main push path, explicitly build from the merged commit on `main` (or `github.event.pull_request.merge_commit_sha`) and ensure metadata/tag computation targets `main`/default-branch tagging when the PR was merged into `main`.
Adding a pull_request: closed trigger alongside the existing push trigger will cause this workflow to run twice for typical manual merges into main (once on the push, once on pull_request closed+merged). That can double-build and double-push the same image and waste CI minutes (and can also create nondeterminism if both jobs race to push tags).
Consider narrowing the pull_request path to only the cases where push is suppressed (e.g., merges performed by github-actions[bot] / your auto-merge workflow), or add workflow/job concurrency keyed to the resulting main-branch commit so only one run publishes.
Adding a `pull_request: closed` trigger alongside the existing `push` trigger will cause this workflow to run twice for typical manual merges into `main` (once on the `push`, once on `pull_request` closed+merged). That can double-build and double-push the same image and waste CI minutes (and can also create nondeterminism if both jobs race to push tags).
Consider narrowing the `pull_request` path to only the cases where `push` is suppressed (e.g., merges performed by `github-actions[bot]` / your auto-merge workflow), or add workflow/job concurrency keyed to the resulting main-branch commit so only one run publishes.
This PR updates the Docker publish workflow to ensure Docker images are built and pushed even when merges are performed via GITHUB_TOKEN (which can suppress push events on main), by triggering on pull_request close events and gating execution to merged PRs.
Changes:
Add pull_request trigger for types: [closed] on main.
Add a job-level if condition to skip PRs that were closed without merging.
**Review:** Commented
## Pull request overview
This PR updates the Docker publish workflow to ensure Docker images are built and pushed even when merges are performed via `GITHUB_TOKEN` (which can suppress `push` events on `main`), by triggering on `pull_request` close events and gating execution to merged PRs.
**Changes:**
- Add `pull_request` trigger for `types: [closed]` on `main`.
- Add a job-level `if` condition to skip PRs that were closed without merging.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
<!-- gitlab-to-gitea-assignment:35:MergeRequest:142 -->
Preserved source assignment/reviewer metadata. Historical accounts stay inactive.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When
dependabot-auto-mergemerges a PR usingGITHUB_TOKEN, GitHub suppresses the resultingpushevent onmain— sodocker-build-push.ymlnever fires. This explains why Docker publishes stopped after the auto-merge workflow was introduced.Changes
docker-build-push.yml: Addpull_request: types: [closed]trigger — thepull_requestclosed event is fired by GitHub's infrastructure regardless of who performed the merge, bypassing theGITHUB_TOKENpush-suppressionifguard to skip PRs that were closed without merging⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.
assigned to
@Copilotassigned to
@THoguetchanged title from {-[WIP] Add-} image publish{-ing-} on {-commits and PR merges to main-} to {+Verify: Docker+} image publish on {+every main push/merge is already implemented+}
requested review from
@THoguetchanged title from {-Verify:-} Docker {-image -}publish {-on every main push/merge is already implemented-} to {+Fix+} Docker publish {+not triggering after GITHUB_TOKEN-merged PRs+}
requested review from
@CopilotMerged by: THoguet at 2026-03-23 22:51:03 UTC
With the new
pull_request(closed) execution path, the workflow’s ref/sha context is no longer themainbranch push. As written,actions/checkoutwill check out the PR ref by default anddocker/metadata-actiontag generation (type=ref,event=branchandenable={{is_default_branch}}) is likely to produce different tags than thepush-to-mainpath (e.g., not updating themain/latesttags). This means the added trigger may still not publish the tags you expect for mainline builds.To make the PR-closed path equivalent to the main push path, explicitly build from the merged commit on
main(orgithub.event.pull_request.merge_commit_sha) and ensure metadata/tag computation targetsmain/default-branch tagging when the PR was merged intomain.Adding a
pull_request: closedtrigger alongside the existingpushtrigger will cause this workflow to run twice for typical manual merges intomain(once on thepush, once onpull_requestclosed+merged). That can double-build and double-push the same image and waste CI minutes (and can also create nondeterminism if both jobs race to push tags).Consider narrowing the
pull_requestpath to only the cases wherepushis suppressed (e.g., merges performed bygithub-actions[bot]/ your auto-merge workflow), or add workflow/job concurrency keyed to the resulting main-branch commit so only one run publishes.Review: Commented
Pull request overview
This PR updates the Docker publish workflow to ensure Docker images are built and pushed even when merges are performed via
GITHUB_TOKEN(which can suppresspushevents onmain), by triggering onpull_requestclose events and gating execution to merged PRs.Changes:
pull_requesttrigger fortypes: [closed]onmain.ifcondition to skip PRs that were closed without merging.Preserved source assignment/reviewer metadata. Historical accounts stay inactive.
Source requested reviewers: admin-backup (GitLab user 3).
The linked history record retains original IDs and source dates. No historical identity was merged into nessar or granted new authentication permissions.
Preserved GitLab !142 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 10.
gitlab-35-mergerequest-142.md (SHA-256
0817dc52a40b114d17562b12238077e3ec58bc9ac496b24f03408b4f5f593148)gitlab-35-mergerequest-142.json (SHA-256
439acb453ffe2e060cd014675141bf028c5f0e1f4d5837660779b8a8d97fdcfe)Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.