workflows/merge-group: init (#431146)
This commit is contained in:
commit
a895a97bec
14
.github/workflows/README.md
vendored
14
.github/workflows/README.md
vendored
@ -61,3 +61,17 @@ This results in a key with the following semantics:
|
||||
```
|
||||
<running-workflow>-<triggering-workflow>-<triggered-event>-<pull-request/fallback>
|
||||
```
|
||||
|
||||
## Required Status Checks
|
||||
|
||||
The "Required Status Checks" branch ruleset is implemented in two top-level workflows: `pr.yml` and `merge-group.yml`.
|
||||
|
||||
The PR workflow defines all checks that need to succeed to add a Pull Request to the Merge Queue.
|
||||
If no Merge Queue is set up for a branch, the PR workflow defines the checks required to merge into the target branch.
|
||||
|
||||
The Merge Group workflow defines all checks that are run as part of the Merge Queue.
|
||||
Only when these pass, a Pull Request is finally merged into the target branch.
|
||||
They don't apply when no Merge Queue is set up.
|
||||
|
||||
Both workflows work with the same `no PR failures` status check.
|
||||
This name can never be changed, because it's used in the branch ruleset for these rules.
|
||||
|
31
.github/workflows/merge-group.yml
vendored
Normal file
31
.github/workflows/merge-group.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Merge Group
|
||||
|
||||
on:
|
||||
merge_group:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
uses: ./.github/workflows/lint.yml
|
||||
with:
|
||||
mergedSha: ${{ github.event.merge_group.head_sha }}
|
||||
targetSha: ${{ github.event.merge_group.base_sha }}
|
||||
|
||||
# This job's only purpose is to serve as a target for the "Required Status Checks" branch ruleset.
|
||||
# It "needs" all the jobs that should block the Merge Queue.
|
||||
# If they pass, it is skipped — which counts as "success" for purposes of the branch ruleset.
|
||||
# However, if any of them fail, this job will also fail — thus blocking the branch ruleset.
|
||||
no-pr-failures:
|
||||
# Modify this list to add or remove jobs from required status checks.
|
||||
needs:
|
||||
- lint
|
||||
# WARNING:
|
||||
# Do NOT change the name of this job, otherwise the rule will not catch it anymore.
|
||||
# This would prevent all PRs from passing the merge queue.
|
||||
name: no PR failures
|
||||
if: ${{ failure() }}
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- run: exit 1
|
Loading…
x
Reference in New Issue
Block a user