Skip to content

Commit

Permalink
Use environment to separate secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonz0718 committed Jan 5, 2024
1 parent f7ecf60 commit 47f84fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/external-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ jobs:
- run: true
build_and_test:
needs: authorize
environment: 'alpha-sepolia'
uses: ./.github/workflows/build-and-test.yaml
with:
sha: ${{ github.event.pull_request.head.sha }}
secrets:
API_BASE_URL: ${{ secrets.API_BASE_URL }}
STORY_PROTOCOL_CONTRACT: ${{ secrets.STORY_PROTOCOL_CONTRACT_ALPHA }}
IP_ASSET_REGISTRY_CONTRACT: ${{ secrets.IP_ASSET_REGISTRY_CONTRACT_ALPHA }}
IP_ORG_CONTROLLER_CONTRACT: ${{ secrets.IP_ORG_CONTROLLER_CONTRACT_ALPHA }}
RELATIONSHIP_MODULE_CONTRACT: ${{ secrets.RELATIONSHIP_MODULE_CONTRACT_ALPHA }}
REGISTRATION_MODULE_CONTRACT: ${{ secrets.REGISTRATION_MODULE_CONTRACT_ALPHA }}
LICENSE_REGISTRY_CONTRACT: ${{ secrets.LICENSE_REGISTRY_CONTRACT_ALPHA }}
MODULE_REGISTRY_CONTRACT: ${{ secrets.MODULE_REGISTRY_CONTRACT_ALPHA }}
LICENSE_MODULE_CONTRACT: ${{ secrets.LICENSE_MODULE_CONTRACT_ALPHA }}
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL_SEPOLIA }}
STORY_PROTOCOL_CONTRACT: ${{ secrets.STORY_PROTOCOL_CONTRACT }}
IP_ASSET_REGISTRY_CONTRACT: ${{ secrets.IP_ASSET_REGISTRY_CONTRACT }}
IP_ORG_CONTROLLER_CONTRACT: ${{ secrets.IP_ORG_CONTROLLER_CONTRACT }}
RELATIONSHIP_MODULE_CONTRACT: ${{ secrets.RELATIONSHIP_MODULE_CONTRACT }}
REGISTRATION_MODULE_CONTRACT: ${{ secrets.REGISTRATION_MODULE_CONTRACT }}
LICENSE_REGISTRY_CONTRACT: ${{ secrets.LICENSE_REGISTRY_CONTRACT }}
MODULE_REGISTRY_CONTRACT: ${{ secrets.MODULE_REGISTRY_CONTRACT }}
LICENSE_MODULE_CONTRACT: ${{ secrets.LICENSE_MODULE_CONTRACT }}
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
TEST_WALLET_ADDRESS: ${{ secrets.TEST_WALLET_ADDRESS }}
TEST_IPORG_ID: ${{ secrets.TEST_IPORG_ID }}
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/internal-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ on:
jobs:
build_and_test:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
environment: 'alpha-sepolia'
uses: ./.github/workflows/build-and-test.yaml
with:
sha: ${{ github.event.pull_request.head.sha }}
secrets:
API_BASE_URL: ${{ secrets.API_BASE_URL }}
STORY_PROTOCOL_CONTRACT: ${{ secrets.STORY_PROTOCOL_CONTRACT_ALPHA }}
IP_ASSET_REGISTRY_CONTRACT: ${{ secrets.IP_ASSET_REGISTRY_CONTRACT_ALPHA }}
IP_ORG_CONTROLLER_CONTRACT: ${{ secrets.IP_ORG_CONTROLLER_CONTRACT_ALPHA }}
RELATIONSHIP_MODULE_CONTRACT: ${{ secrets.RELATIONSHIP_MODULE_CONTRACT_ALPHA }}
REGISTRATION_MODULE_CONTRACT: ${{ secrets.REGISTRATION_MODULE_CONTRACT_ALPHA }}
LICENSE_REGISTRY_CONTRACT: ${{ secrets.LICENSE_REGISTRY_CONTRACT_ALPHA }}
MODULE_REGISTRY_CONTRACT: ${{ secrets.MODULE_REGISTRY_CONTRACT_ALPHA }}
LICENSE_MODULE_CONTRACT: ${{ secrets.LICENSE_MODULE_CONTRACT_ALPHA }}
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL_SEPOLIA }}
STORY_PROTOCOL_CONTRACT: ${{ secrets.STORY_PROTOCOL_CONTRACT }}
IP_ASSET_REGISTRY_CONTRACT: ${{ secrets.IP_ASSET_REGISTRY_CONTRACT }}
IP_ORG_CONTROLLER_CONTRACT: ${{ secrets.IP_ORG_CONTROLLER_CONTRACT }}
RELATIONSHIP_MODULE_CONTRACT: ${{ secrets.RELATIONSHIP_MODULE_CONTRACT }}
REGISTRATION_MODULE_CONTRACT: ${{ secrets.REGISTRATION_MODULE_CONTRACT }}
LICENSE_REGISTRY_CONTRACT: ${{ secrets.LICENSE_REGISTRY_CONTRACT }}
MODULE_REGISTRY_CONTRACT: ${{ secrets.MODULE_REGISTRY_CONTRACT }}
LICENSE_MODULE_CONTRACT: ${{ secrets.LICENSE_MODULE_CONTRACT }}
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
TEST_WALLET_ADDRESS: ${{ secrets.TEST_WALLET_ADDRESS }}
TEST_IPORG_ID: ${{ secrets.TEST_IPORG_ID }}
Expand Down

0 comments on commit 47f84fd

Please sign in to comment.