Changed trigger from check_suite to workflow_run on CI workflow. This ensures all jobs (typecheck, lint, test, build, e2e) pass before auto-merging, not just the first check to complete. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
779 B
YAML
33 lines
779 B
YAML
name: Automerge
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["CI"]
|
|
types: [completed]
|
|
pull_request:
|
|
types: [labeled]
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
jobs:
|
|
automerge:
|
|
name: Automerge PR
|
|
runs-on: ubuntu-latest
|
|
if: >
|
|
github.event_name == 'pull_request' ||
|
|
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Automerge
|
|
uses: pascalgn/automerge-action@v0.16.4
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
MERGE_LABELS: "automerge"
|
|
MERGE_METHOD: "merge"
|
|
MERGE_DELETE_BRANCH: "true"
|
|
UPDATE_METHOD: "rebase"
|