mirror of https://github.com/panjf2000/ants.git
chore: update the workflow of "Check pull request target"
This commit is contained in:
parent
46f9b68028
commit
89ecc3ff68
|
@ -1,17 +1,19 @@
|
|||
name: Check pull request target
|
||||
on:
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
check-branches:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check target branch
|
||||
run: |
|
||||
if [ ${{ github.base_ref }} == "master" ] && [ ${{ github.head_ref }} != "dev" ]; then
|
||||
if [ ${{ github.head_ref }} != "dev" ]; then
|
||||
echo "Only pull requests from dev branch are only allowed to be merged into master branch."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue