Skip to content

Commit f3c6074

Browse files
committed
github: workflows: Add a Do Not Merge workflow
This allows us to fail CI if a DNM label is set. It's also preparation for a manifest workflow which can set the label automatically when the manifest points at a pull request rather than an actual commit in a module. Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
1 parent 6ad0ab3 commit f3c6074

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/do_not_merge.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Do Not Merge
2+
3+
on:
4+
pull_request:
5+
types: [synchronize, opened, reopened, labeled, unlabeled]
6+
7+
jobs:
8+
do-not-merge:
9+
if: ${{ contains(github.event.*.labels.*.name, 'DNM') }}
10+
name: Prevent Merging
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Check for label
14+
run: |
15+
echo "Pull request is labeled as 'DNM'."
16+
echo "This workflow fails so that the pull request cannot be merged."
17+
exit 1

0 commit comments

Comments
 (0)