Skip to content

Commit

Permalink
ci: branch protection ci workflows (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Jun 21, 2024
1 parent 221ed1f commit 9a0225e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/devnet-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Devnet branch protection"

on:
pull_request:

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'devnet' && github.head_ref != 'develop'
run: |
echo "ERROR: You can only merge to devnet from develop."
exit 1
14 changes: 14 additions & 0 deletions .github/workflows/main-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Main branch protection"

on:
pull_request:

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

0 comments on commit 9a0225e

Please sign in to comment.