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