File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 2525
2626
2727jobs :
28+
29+ # Validate deployment network and environment.
30+ validate :
31+ runs-on : ubuntu-latest
32+ steps :
33+ - uses : actions/checkout@v4
34+ with :
35+ fetch-depth : 0
36+
37+ # On Github, the environment `mainnets` is restricted to
38+ # the main branch. Here we check that it's only used with
39+ # mainnet networks.
40+ - name : Validate mainnet deployment
41+ run : |
42+ if [[ "${{ inputs.environment }}" == "mainnets" && "${{ inputs.network }}" != "bellecour" ]]; then
43+ echo "::error::mainnets environment can only be used with mainnet networks."
44+ exit 1
45+ fi
46+ echo "Deploying to network '${{ inputs.network }}' with environment '${{ inputs.environment }}'."
47+
48+ # Deploy and verify contract.
2849 build-and-test :
50+ needs : validate
2951 uses : ./.github/workflows/sharing-smart-contracts-ci.yml
3052 with :
3153 node-version : 20
You can’t perform that action at this time.
0 commit comments