-
Notifications
You must be signed in to change notification settings - Fork 30
46 lines (38 loc) · 1.27 KB
/
check-blocking-labels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
name: Check Blocking Labels
on:
# run pipeline on pull request
pull_request:
types:
- opened
- synchronize
- labeled
- unlabeled
# run pipeline on merge queue
merge_group:
# run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-blocking-labels
cancel-in-progress: true
jobs:
check-blocking-labels:
runs-on: ubuntu-latest
steps:
- name: do-not-merge
if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
run: |
echo "This pull request should not be merged (do-not-merge)"
exit 1
- name: merge-target-first
if: contains(github.event.pull_request.labels.*.name, 'merge-target-first')
run: |
echo "The target branch of this PR should be merged first (merge-target-first)"
exit 2
- name: needs-unit-tests
if: contains(github.event.pull_request.labels.*.name, 'needs-unit-tests')
run: |
echo "This pull request needs (more) unit tests before it may be merged (needs-unit-tests)"
exit 3