Skip to content

Commit 1d5ef06

Browse files
authored
Merge pull request #54 from datakind/develop
merging from develop to staging
2 parents 758df70 + 2614d19 commit 1d5ef06

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Enforce PR Source Branch
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- staging
7+
- prod
8+
9+
jobs:
10+
check-source-branch:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check PR source branch
14+
run: |
15+
if [[ "$GITHUB_BASE_REF" == "staging" && "$GITHUB_HEAD_REF" != "develop" ]]; then
16+
echo "Only 'develop' can merge into 'staging'"
17+
exit 1
18+
elif [[ "$GITHUB_BASE_REF" == "prod" && "$GITHUB_HEAD_REF" != "staging" ]]; then
19+
echo "Only 'staging' can merge into 'prod'"
20+
exit 1
21+
fi

0 commit comments

Comments
 (0)