Skip to content

Commit

Permalink
ci: workflow to prevent pushing to main from any other than develop
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCommander735 committed May 20, 2024
1 parent 07f226d commit 931b6a8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Check Branch'

on:
pull_request:
branches:
- 'main'
jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'main' && github.head_ref != 'develop'
run: |
echo "ERROR: You can only merge to main from develop."
exit 1

0 comments on commit 931b6a8

Please sign in to comment.