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    name: Prevent Merging
12    runs-on: ubuntu-22.04
13    steps:
14      - name: Check for label
15        run: |
16          echo "Pull request is labeled as 'DNM' or 'TSC'"
17          echo "This workflow fails so that the pull request cannot be merged"
18          exit 1
19