diff --git a/.github/workflows/testmerge-blocker.yml b/.github/workflows/testmerge-blocker.yml new file mode 100644 index 0000000000000..ad49f5e998116 --- /dev/null +++ b/.github/workflows/testmerge-blocker.yml @@ -0,0 +1,17 @@ +name: "Test Merge Blocker" + +on: + pull_request: + types: [synchronize, opened, labeled, unlabeled] + +jobs: + testmerge-blocker: + name: Enforce Test Merge Label + runs-on: ubuntu-latest + steps: + - name: Enforce Test Merge Label + if: contains(github.event.pull_request.labels.*.name, 'Test Merge') && !contains(github.event.pull_request.labels.*.name, 'Test Merge Passed') + run: | + echo "Pull request is labeled for Test Merge and has not been flagged as Test Merge Passed." + echo "The test merge must pass, or the label removed, before this PR can be merged." + exit 1