CI - disallow PRs to master from any branch but dev

This commit is contained in:
Diogo Trindade committed 2023-09-10 15:19:12 +01:00
1 parent d96581f11c
commit d57e90956f
1 file changed
+17
+17
View File
@@ -0,0 +1,17 @@
name: Check pull request branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "development" ] && [ ${{ github.base_ref }} == "master" ]; then
echo "Merge requests to master are only allowed from development."
exit 1
fi