Fix automerge: add workflow_run trigger after CI completes
check_suite and status events don't reliably trigger for workflows on the same commit (GitHub prevents infinite loops). Replaced with workflow_run on CI completion, which fires after all CI jobs finish. Added comments explaining why each trigger group exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e4d4c790b3
commit
052ff6ac20
1 changed files with 9 additions and 2 deletions
11
.github/workflows/automerge.yml
vendored
11
.github/workflows/automerge.yml
vendored
|
|
@ -1,5 +1,12 @@
|
||||||
name: Automerge
|
name: Automerge
|
||||||
|
|
||||||
|
# Triggers:
|
||||||
|
# - pull_request: fires when PR is opened, labeled, updated, etc.
|
||||||
|
# Handles the case where the label is added after CI already passed.
|
||||||
|
# - workflow_run (CI): fires after the CI workflow completes.
|
||||||
|
# This is needed because check_suite and status events don't reliably
|
||||||
|
# fire for workflows on the same commit (GitHub prevents infinite loops).
|
||||||
|
# Without this, the automerge action never retries after CI passes.
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
|
|
@ -14,10 +21,10 @@ on:
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types:
|
types:
|
||||||
- submitted
|
- submitted
|
||||||
check_suite:
|
workflow_run:
|
||||||
|
workflows: ["CI"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
status: {}
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue