File tree Expand file tree Collapse file tree 3 files changed +90
-7
lines changed Expand file tree Collapse file tree 3 files changed +90
-7
lines changed Original file line number Diff line number Diff line change 11name : lint
22
33on :
4- pull_request :
5- paths-ignore :
6- - " **.md"
7- - " **.svg"
8- - " .gitignore"
9- - " LICENSE"
10- - " flake.lock"
4+ workflow_call :
5+ inputs :
6+ ref :
7+ required : true
8+ type : string
119
1210permissions :
1311 contents : read
1816 steps :
1917 - name : Checkout repository
2018 uses : actions/checkout@v4
19+ with :
20+ ref : ${{ inputs.ref }}
21+
2122 - name : Install Nix
2223 uses : cachix/install-nix-action@v31
2324 with :
Original file line number Diff line number Diff line change 1+ name : Merge Queue
2+
3+ on :
4+ merge_group :
5+
6+ permissions : {}
7+
8+ jobs :
9+ lint :
10+ uses : ./.github/workflows/lint.yml
11+ with :
12+ ref : ${{ github.event.merge_group.head_sha }}
13+
14+ # This job posts the "Required Status Checks" to satisfy our ruleset.
15+ required-checks :
16+ # It "needs" all the jobs that should block the Merge Queue.
17+ # Modify this list to add or remove jobs from required status checks.
18+ needs :
19+ - lint
20+
21+ name : Required checks
22+ runs-on : ubuntu-24.04-arm
23+ permissions :
24+ statuses : write
25+ steps :
26+ - uses : actions/github-script@v7
27+ with :
28+ script : |
29+ const { serverUrl, repo, runId, payload } = context
30+ await github.rest.repos.createCommitStatus({
31+ ...repo,
32+ sha: payload.merge_group.head_sha,
33+ target_url: `${serverUrl}/${repo.owner}/${repo.repo}/actions/runs/${runId}`,
34+ // WARNING:
35+ // Do NOT change the context name or it will not match the ruleset.
36+ // This would prevent all PRs from merging.
37+ context: 'PR checks successful',
38+ state: 'success',
39+ })
Original file line number Diff line number Diff line change 1+ name : PR
2+
3+ on :
4+ pull_request_target :
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+ lint :
14+ uses : ./.github/workflows/lint.yml
15+ with :
16+ ref : ${{ github.event.pull_request.head.sha }}
17+
18+ # This job posts the "Required Status Checks" to satisfy our ruleset.
19+ required-checks :
20+ # It "needs" all the jobs that should block merging a PR.
21+ # Modify this list to add or remove jobs from required status checks.
22+ needs :
23+ - lint
24+
25+ name : Required checks
26+ runs-on : ubuntu-24.04-arm
27+ permissions :
28+ statuses : write
29+ steps :
30+ - uses : actions/github-script@v7
31+ with :
32+ script : |
33+ const { serverUrl, repo, runId, payload } = context
34+ await github.rest.repos.createCommitStatus({
35+ ...repo,
36+ sha: payload.pull_request.head.sha,
37+ target_url: `${serverUrl}/${repo.owner}/${repo.repo}/actions/runs/${runId}`,
38+ // WARNING:
39+ // Do NOT change the context name or it will not match the ruleset.
40+ // This would prevent all PRs from merging.
41+ context: 'PR checks successful',
42+ state: 'success',
43+ })
You can’t perform that action at this time.
0 commit comments