Skip to content

Commit 2f90f40

Browse files
committed
new github workflow: check-branches
1 parent 4fb763a commit 2f90f40

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/check-branches.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check pull request branch
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
- edited
9+
10+
jobs:
11+
check-branches:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check branches
15+
run: |
16+
if [ ${{ github.head_ref }} != "devel" ] && [ ${{ github.base_ref }} == "master" ]; then
17+
echo "Merge requests to master branch are only allowed from devel branch."
18+
exit 1
19+
fi

0 commit comments

Comments
 (0)