Skip to content

Commit

Permalink
ci: updated multichain deployment logic (#132)
Browse files Browse the repository at this point in the history
* ci: updated multichain deployment logic

* ci: introduce development branch

* ci: improve stage naming
  • Loading branch information
filo87 authored Apr 30, 2024
1 parent 155968b commit a2c6d8d
Showing 1 changed file with 17 additions and 33 deletions.
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

0 comments on commit a2c6d8d

Please sign in to comment.