fix: monitor and compare commands for mantle and mantle-testnet (#72) #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy subgraph | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
chain: ["arbitrum-one", "avalanche", "bsc", "celo", "fantom", "fuse", "goerli", "mainnet", "mantle-testnet", "mantle", "matic", "xdai", "optimism", "moonbeam", "tombchain"] | |
environment: | |
name: ${{ matrix.chain }} | |
# Use Mantle Foundation graph node for Mantle Testnet | |
# Use FuxionX graph node for Mantle | |
# Use TheGraph Hosted Service for all other networks | |
url: ${{ matrix.chain == 'mantle-testnet' && 'https://graph.testnet.mantle.xyz/subgraphs/name/requestnetwork/request-payments-mantle-testnet' || matrix.chain == 'mantle' && 'https://graph.fusionx.finance/subgraphs/name/requestnetwork/request-payments-mantle' || format('https://thegraph.com/hosted-service/subgraph/requestnetwork/request-payments-{0}', matrix.chain) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn | |
- uses: ./.github/actions/short-sha | |
id: short-sha | |
- run: yarn subgraph deploy ${{ matrix.chain }} | |
env: | |
TOKEN: ${{ secrets.THEGRAPH_TOKEN }} | |
VERSION: ${{ steps.short-sha.outputs.hash }} |