You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
563 B
16 lines
563 B
name: Enforce Develop Branch
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master # Triggers only on PRs targeting master
|
|
|
|
jobs:
|
|
guard-master:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check base branch
|
|
# logic: If the PR is NOT coming from a release or hotfix branch, block it.
|
|
if: "!startsWith(github.head_ref, 'release/') && !startsWith(github.head_ref, 'hotfix/')"
|
|
run: |
|
|
echo "::error::⛔ WRONG BRANCH: You are trying to merge into 'master'. Please change the base branch of this PR to 'develop'."
|
|
exit 1
|
|
|