2023-06-30 15:30:36 +03:00
|
|
|
name: Check pull request target
|
|
|
|
on:
|
2023-06-30 16:17:48 +03:00
|
|
|
pull_request:
|
2023-06-30 15:30:36 +03:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- reopened
|
|
|
|
- synchronize
|
2023-06-30 16:17:48 +03:00
|
|
|
branches:
|
|
|
|
- master
|
2023-06-30 15:30:36 +03:00
|
|
|
jobs:
|
|
|
|
check-branches:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check target branch
|
|
|
|
run: |
|
2023-06-30 16:17:48 +03:00
|
|
|
if [ ${{ github.head_ref }} != "dev" ]; then
|
2023-06-30 15:30:36 +03:00
|
|
|
echo "Only pull requests from dev branch are only allowed to be merged into master branch."
|
|
|
|
exit 1
|
2023-06-30 16:17:48 +03:00
|
|
|
fi
|