We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 88c2fbb + 4857ffb commit fbf15e4Copy full SHA for fbf15e4
1 file changed
.github/workflows/branch_protection.yml
@@ -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
16
17
18
+ if: github.base_ref == 'mainnet' && github.head_ref != 'testnet'
19
20
+ echo "ERROR: You can only merge to mainnet from testnet."
21
0 commit comments