diff --git a/.github/workflows/fail-do-not-merge.yml b/.github/workflows/fail-do-not-merge.yml new file mode 100644 index 0000000000..54349fe903 --- /dev/null +++ b/.github/workflows/fail-do-not-merge.yml @@ -0,0 +1,17 @@ +name: Do Not Merge + +on: + pull_request: + types: [synchronize, opened, reopened, labeled, unlabeled] + +jobs: + do-not-merge: + if: contains(github.event.pull_request.labels.*.name, 'DO NOT MERGE') + name: Prevent Merging + runs-on: ubuntu-latest + steps: + - name: Check for label + run: | + echo "Pull request is labeled as 'DO NOT MERGE'" + echo "This workflow fails so that the pull request cannot be merged" + exit 1