Skip to content

Commit 2b56029

Browse files
committed
feat(ci-cd): branch checker
Add a branch checker workflow to enforce merging into prod from the develop branch as shared on the contributing guidelines
1 parent 6f01088 commit 2b56029

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/branch-check.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Check Source Branch
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
check-branch:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Verify source branch is 'develop'
11+
run: |
12+
if [[ "${{ github.head_ref }}" != "develop" ]]; then
13+
echo "Error: Pull request must come from the 'develop' branch"
14+
exit 1
15+
fi

0 commit comments

Comments
 (0)