-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (68 loc) · 1.93 KB
/
deploy-subgraph.yml
File metadata and controls
77 lines (68 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Deploy Automation Subgraph
permissions:
contents: read
on:
workflow_dispatch:
inputs:
automation_subgraph:
description: "Automation subgraph to deploy. Version is taken from package.json"
required: true
type: choice
options:
- vesting-scheduler
- wrap-scheduler
- flow-scheduler
network:
description: "Network to deploy to (e.g. 'optimism-sepolia', or 'all')"
required: true
type: string
env:
SUBGRAPH_ROOT: subgraphs
DEPLOY_SCRIPT: ./scripts/deployGraph.sh
jobs:
deploy-single:
if: ${{ inputs.network != 'all' }}
name: Deploy to ${{ inputs.network }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
- name: Install
run: pnpm install
- name: Run deploy script
run: |
$DEPLOY_SCRIPT -n "${{ inputs.network }}" -d "${{ inputs.automation_subgraph }}"
working-directory: ${{ env.SUBGRAPH_ROOT }}
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
deploy-matrix:
if: ${{ inputs.network == 'all' }}
name: Deploy to all supported networks
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
network:
- base-mainnet
- optimism-mainnet
- arbitrum-one
- polygon-mainnet
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
- name: Install
run: pnpm install
- name: Run deploy script
run: |
$DEPLOY_SCRIPT -n "${{ matrix.network }}" -d "${{ inputs.automation_subgraph }}"
working-directory: ${{ env.SUBGRAPH_ROOT }}
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}