Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: updated multichain deployment logic #132

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 17 additions & 33 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
push:
branches:
- main
- release-*
- development
#- release-*
workflow_dispatch:

permissions:
Expand All @@ -13,46 +14,29 @@ permissions:

jobs:
subql_deploy_staging:
if: ${{ github.repository == 'embrio-tech/centrifuge-subql'}}
name: Deploy to SubQL
if: ${{ github.ref_name == 'development' }}
name: Deploy to SubQL (staging)
strategy:
matrix:
chainId: [demo]
chainId: [development, demo] # ADD ARRAY OF CHAINS TO DEPLOY
uses: ./.github/workflows/subql_deploy_workflow.yaml
with:
chainId: ${{ matrix.chainId }}
projOrg: centrifuge
projImage: 'https://centrifuge.io/static/bfb7682cb6ed4aa422d9d2c90cd9351a/centrifuge-logomark-black.svg'
deploymentType: stage
resetProject: false
deploymentType: primary
resetProject: true
secrets:
accessToken: ${{ secrets.SUBQL_ACCESS_TOKEN }}
onfinalityApiKey: ${{ secrets.ONFINALITY_API_KEY }}

subql_deploy_staging_multichain:
if: ${{ github.repository == 'embrio-tech/centrifuge-subql'}}
name: Deploy to SubQL Multichain
subql_deploy_multichain_staging:
if: ${{ github.ref_name == 'development' }}
name: Deploy to SubQL multichain (staging)
strategy:
matrix:
chainId: [demo, centrifuge]
chainId: [demo] # ADD ARRAY OF CHAINS TO DEPLOY
uses: ./.github/workflows/subql_multi_deploy_workflow.yaml
with:
chainId: ${{ matrix.chainId }}
projOrg: centrifuge
projImage: 'https://centrifuge.io/static/bfb7682cb6ed4aa422d9d2c90cd9351a/centrifuge-logomark-black.svg'
deploymentType: stage
resetProject: false
secrets:
accessToken: ${{ secrets.SUBQL_ACCESS_TOKEN }}
onfinalityApiKey: ${{ secrets.ONFINALITY_API_KEY }}

subql_deploy_centrifuge_staging:
if: ${{ github.repository == 'centrifuge/pools-subql' && github.ref_name == 'main' }}
name: Deploy to SubQL (CENTRIFUGE staging)
strategy:
matrix:
chainId: [development, demo] # ADD ARRAY OF CHAINS TO DEPLOY
uses: ./.github/workflows/subql_deploy_workflow.yaml
with:
chainId: ${{ matrix.chainId }}
projOrg: centrifuge
Expand All @@ -63,9 +47,9 @@ jobs:
accessToken: ${{ secrets.SUBQL_ACCESS_TOKEN }}
onfinalityApiKey: ${{ secrets.ONFINALITY_API_KEY }}

subql_deploy_centrifuge_production:
if: ${{ github.repository == 'centrifuge/pools-subql' && startsWith(github.ref_name, 'release-') }}
name: Deploy to SubQL (CENTRIFUGE mainnet)
subql_deploy_production:
if: ${{ github.ref_name == 'main' }}
name: Deploy to SubQL (mainnet)
strategy:
matrix:
chainId: [centrifuge] # ADD ARRAY OF CHAINS TO DEPLOY
Expand All @@ -80,9 +64,9 @@ jobs:
accessToken: ${{ secrets.SUBQL_ACCESS_TOKEN }}
onfinalityApiKey: ${{ secrets.ONFINALITY_API_KEY }}

subql_deploy_centrifuge_multichain_production:
if: ${{ github.repository == 'centrifuge/pools-subql' && startsWith(github.ref_name, 'release-') }}
name: Deploy to SubQL multichain (CENTRIFUGE mainnet)
subql_deploy_multichain_production:
if: ${{ github.ref_name == 'main' }}
name: Deploy to SubQL multichain (mainnet)
strategy:
matrix:
chainId: [centrifuge] # ADD ARRAY OF CHAINS TO DEPLOY
Expand Down
Loading