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
|
name: Check pull request target
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- reopened
|
- reopened
|
||||||
- synchronize
|
- synchronize
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
check-branches:
|
check-branches:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check target branch
|
- name: Check target branch
|
||||||
run: |
|
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."
|
echo "Only pull requests from dev branch are only allowed to be merged into master branch."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue