1name: Do Not Merge
2
3on:
4  pull_request:
5    types: [synchronize, opened, reopened, labeled, unlabeled]
6
7jobs:
8  do-not-merge:
9    name: Prevent Merging
10    runs-on: ubuntu-22.04
11    steps:
12      - name: Check for label
13        if: ${{ contains(github.event.*.labels.*.name, 'DNM') ||
14                contains(github.event.*.labels.*.name, 'TSC') ||
15                contains(github.event.*.labels.*.name, 'Architecture Review') ||
16                contains(github.event.*.labels.*.name, 'dev-review') }}
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