Skip to content

Commit fbf15e4

Browse files
authored
Merge pull request #2 from Daemon-Computer/feat/actions
Added branch protection rules
2 parents 88c2fbb + 4857ffb commit fbf15e4

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: branch_protection.yml
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
protect_testnet:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Protect branch
10+
if: github.base_ref == 'testnet' && github.head_ref != 'main'
11+
run: |
12+
echo "ERROR: You can only merge to testnet from main."
13+
exit 1
14+
protect_mainnet:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Protect branch
18+
if: github.base_ref == 'mainnet' && github.head_ref != 'testnet'
19+
run: |
20+
echo "ERROR: You can only merge to mainnet from testnet."
21+
exit 1

0 commit comments

Comments
 (0)