Skip to content

Commit f11b58a

Browse files
workflows/check: run "checks" in one workflow
This introduces "check" as another category of jobs suitable for the "Require status checks to pass" feature. Checks as a category would include everything that is done before even looking at the code: Right branch? Commit messages? Cherry-picked correctly? (commit messages are not checked, yet)
1 parent c7d85b5 commit f11b58a

File tree

2 files changed

+26
-40
lines changed

2 files changed

+26
-40
lines changed
Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,45 @@
1-
name: "Check cherry-picks"
1+
name: Check
22

33
on:
44
pull_request:
55
paths:
6-
- .github/workflows/check-cherry-picks.yml
6+
- .github/workflows/check.yml
77
pull_request_target:
8-
branches:
9-
- 'release-**'
10-
- 'staging-**'
11-
- '!staging-next'
128

139
concurrency:
1410
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
1511
cancel-in-progress: true
1612

17-
permissions:
18-
pull-requests: write
13+
permissions: {}
1914

2015
defaults:
2116
run:
2217
shell: bash
2318

2419
jobs:
25-
check:
26-
name: cherry-pick-check
20+
no-channel-base:
21+
name: no channel base
22+
if: |
23+
startsWith(github.base_ref, 'nixos-') ||
24+
startsWith(github.base_ref, 'nixpkgs-')
25+
runs-on: ubuntu-24.04-arm
26+
steps:
27+
- run: |
28+
cat <<EOF
29+
The nixos-* and nixpkgs-* branches are pushed to by the channel
30+
release script and should not be merged into directly.
31+
32+
Please target the equivalent release-* branch or master instead.
33+
EOF
34+
exit 1
35+
36+
cherry-pick:
37+
if: |
38+
github.event_name == 'pull_request' ||
39+
startsWith(github.base_ref, 'release-') ||
40+
(startsWith(github.base_ref, 'staging-') && github.base_ref != 'staging-next')
41+
permissions:
42+
pull-requests: write
2743
runs-on: ubuntu-24.04-arm
2844
steps:
2945
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/no-channel.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)