diff --git a/.github/workflows/do-not-merge.yml b/.github/workflows/do-not-merge.yml new file mode 100644 index 0000000000..f44a8aefa2 --- /dev/null +++ b/.github/workflows/do-not-merge.yml @@ -0,0 +1,19 @@ +name: "Check labels" + +on: + pull_request: + branches: [ "master" ] + types: + - opened + - labeled + - unlabeled + +jobs: + fail-by-label: + runs-on: ubuntu-latest + steps: + - name: Fail if PR is labeled as "do not merge" + if: contains(github.event.pull_request.labels.*.name, 'do not merge') + run: | + echo "This PR is labeled as do not merge!" + exit 1