feat: add validate pr workflow (#41061)
This commit is contained in:
20
.github/workflows/validate-pr.yml
vendored
Normal file
20
.github/workflows/validate-pr.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Validate pull request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, labeled, unlabeled, synchronize, ready_for_review]
|
||||
|
||||
jobs:
|
||||
validate-pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Tagged with 'do not merge'
|
||||
if: contains( github.event.pull_request.labels.*.name, 'do-not-merge')
|
||||
run: |
|
||||
echo "PR blocked: [tag: do not merge]"
|
||||
exit 1
|
||||
|
||||
- name: All good
|
||||
if: ${{ success() }}
|
||||
run: |
|
||||
echo "All good"
|
||||
Reference in New Issue
Block a user