Skip to content

Commit

Permalink
[ECO-2116] Add a branch protection rule to only allow merging to `pro…
Browse files Browse the repository at this point in the history
…duction` from `main` (#209)

Co-authored-by: matt <[email protected]>
  • Loading branch information
xbtmatt and matt authored Aug 22, 2024
1 parent e5b95dd commit d7e8b25
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/production-branch-protection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# yamllint disable rule:empty-lines rule:key-ordering
---
name: 'Production Branch Protection'

"on":
pull_request:
types:
- 'opened'
- 'reopened'
- 'synchronize'
- 'edited'

jobs:
production-branch-protection:
runs-on: 'ubuntu-latest'
steps:
- name: 'Check if the PR is targeting the production branch'
id: 'check_branch'
if: |
github.base_ref == 'production' && github.head_ref != 'main'
run: |
echo ERROR: You can only merge to the production branch from main.
exit 1
...
3 changes: 2 additions & 1 deletion src/rust/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ EMOJICOIN_MODULE_ADDRESS="0x11113ddc70ea051ffd8a7cde7b96818326aabf56fdfd47807f77
# For mainnet: https://grpc.mainnet.aptoslabs.com:443
# For testnet: https://grpc.testnet.aptoslabs.com:443
# For devnet: https://grpc.devnet.aptoslabs.com:443
# For a local end-to-end testing chain: http://streamer:50051
# For a local end-to-end testing chain: http://host.docker.internal:50051,
# or http://localhost:50051 if that doesn't work.
GRPC_DATA_SERVICE_URL="https://grpc.testnet.aptoslabs.com:443"

# For a public chain you have to get this token from https://developers.aptoslabs.com/.
Expand Down

0 comments on commit d7e8b25

Please sign in to comment.