diff --git a/.github/workflows/do-not-merge.yml b/.github/workflows/do-not-merge.yml new file mode 100644 index 00000000000..16aabb59afc --- /dev/null +++ b/.github/workflows/do-not-merge.yml @@ -0,0 +1,20 @@ +name: "Check labels" + +on: + pull_request: + branches: [ "master" ] + types: + - opened + - synchronize + - 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