Skip to content

Commit fe2f8f8

Browse files
committed
ci: init pr.yml and merge-queue.yml workflows
These workflows will serve as top-level entry points for running GHA jobs against PRs and merge groups in the merge queue.
1 parent ecc7880 commit fe2f8f8

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.github/workflows/merge-queue.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Merge Queue
2+
3+
on:
4+
merge_group:
5+
6+
permissions: {}
7+
8+
jobs:
9+
# TODO: add workflow_call jobs
10+
11+
# This job's only purpose is to serve as a target for the "Required Status Checks" branch ruleset.
12+
# It "needs" all the jobs that should block the Merge Queue.
13+
# If they pass, it is skipped — which counts as "success" for purposes of the branch ruleset.
14+
# However, if any of them fail, this job will also fail — thus blocking the branch ruleset.
15+
no-pr-failures:
16+
# Modify this list to add or remove jobs from required status checks.
17+
needs: [] # TODO
18+
# WARNING:
19+
# Do NOT change the name of this job, otherwise the rule will not catch it anymore.
20+
# This would prevent all PRs from passing the merge queue.
21+
name: no PR failures
22+
# The "cancelled()" function only checks the whole workflow, but not individual jobs.
23+
if: ${{ failure() || contains(needs.*.result, 'cancelled') }}
24+
runs-on: ubuntu-24.04-arm
25+
steps:
26+
- run: exit 1

.github/workflows/pr.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: pr-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
8+
cancel-in-progress: true
9+
10+
permissions: {}
11+
12+
jobs:
13+
# TODO: add workflow_call jobs
14+
15+
# This job's only purpose is to serve as a target for the "Required Status Checks" branch ruleset.
16+
# It "needs" all the jobs that should block merging a PR.
17+
# If they pass, it is skipped — which counts as "success" for purposes of the branch ruleset.
18+
# However, if any of them fail, this job will also fail — thus blocking the branch ruleset.
19+
no-pr-failures:
20+
# Modify this list to add or remove jobs from required status checks.
21+
needs: [] # TODO
22+
# WARNING:
23+
# Do NOT change the name of this job, otherwise the rule will not catch it anymore.
24+
# This would prevent all PRs from merging.
25+
name: no PR failures
26+
# The "cancelled()" function only checks the whole workflow, but not individual jobs.
27+
if: ${{ failure() || contains(needs.*.result, 'cancelled') }}
28+
runs-on: ubuntu-24.04-arm
29+
steps:
30+
- run: exit 1

0 commit comments

Comments
 (0)