Skip to content

Commit

Permalink
Add a github workflow that prevents PRs to main that is not comming f…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroCubi authored Apr 26, 2024
1 parent 5559de5 commit 76ef697
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/enforce_main_pr_from_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Check that PR to main is coming from dev if necessary'

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: You can only merge to main from dev."
exit 1

0 comments on commit 76ef697

Please sign in to comment.