-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add workflow to check that the only branch that can merge to main is dev
- Loading branch information
1 parent
beed379
commit db56876
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Check that the only branch that can merge to "main" is "dev" | ||
|
||
name: "Check Branch" | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check_branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check branch | ||
if: github.base_ref == 'main' && github.head_ref != 'dev' | ||
run: | | ||
echo "ERROR: Can only merge to main branch from dev branch" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters