-
Notifications
You must be signed in to change notification settings - Fork 1
153 lines (131 loc) · 6.4 KB
/
upload-subgraph.yaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: 'deploy::subgraph'
on:
push:
branches:
- master
tags:
- '*'
release:
types: [published]
permissions:
id-token: write
contents: read
jobs:
deploy-devnet:
runs-on: thegraph-devnet
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'asdf:install'
uses: asdf-vm/actions/[email protected]
- name: 'yarn:init'
run: yarn
# Deploy fast syncing goerli version
- name: 'graph:codegen:goerli'
run: $(yarn bin)/graph codegen subgraph.goerli_fast.yaml
- name: 'graph:create:goerli'
run: $(yarn bin)/graph create vsuite-goerli --node http://graph-node-query:8020
- name: 'graph:deploy:goerli'
run: $(yarn bin)/graph deploy vsuite-goerli --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.goerli_fast.yaml
- name: 'graph:clean'
run: $(yarn bin)/graph clean
# Deploy slow syncing goerli version
- name: 'graph:codegen:goerli-complete'
run: $(yarn bin)/graph codegen subgraph.goerli.yaml
- name: 'graph:create:goerli-complete'
run: $(yarn bin)/graph create vsuite-goerli-complete --node http://graph-node-query:8020
- name: 'graph:deploy:goerli-complete'
run: $(yarn bin)/graph deploy vsuite-goerli-complete --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.goerli.yaml
- name: 'graph:clean'
run: $(yarn bin)/graph clean
# Deploy fast syncing devnet
- name: 'graph:codegen:devnet'
run: $(yarn bin)/graph codegen subgraph.devnet_fast.yaml
- name: 'graph:create:devnet'
run: $(yarn bin)/graph create vsuite-devnet --node http://graph-node-query:8020
- name: 'graph:deploy:devnet'
run: $(yarn bin)/graph deploy vsuite-devnet --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.devnet_fast.yaml
- name: 'graph:clean'
run: $(yarn bin)/graph clean
# Deploy slow syncing devnet version
- name: 'graph:codegen:devnet-complete'
run: $(yarn bin)/graph codegen subgraph.devnet.yaml
- name: 'graph:create:devnet-complete'
run: $(yarn bin)/graph create vsuite-devnet-complete --node http://graph-node-query:8020
- name: 'graph:deploy:devnet-complete'
run: $(yarn bin)/graph deploy vsuite-devnet-complete --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.devnet.yaml
deploy-testnet:
runs-on: thegraph-testnet
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'asdf:install'
uses: asdf-vm/actions/[email protected]
- name: 'yarn:init'
run: yarn
# Deploy fast syncing goerli version
- name: 'graph:codegen:goerli'
run: $(yarn bin)/graph codegen subgraph.goerli_fast.yaml
- name: 'graph:create:goerli'
run: $(yarn bin)/graph create vsuite-goerli --node http://graph-node-query:8020
- name: 'graph:deploy:goerli'
run: $(yarn bin)/graph deploy vsuite-goerli --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.goerli_fast.yaml
- name: 'graph:clean'
run: $(yarn bin)/graph clean
# Deploy slow syncing goerli version
- name: 'graph:codegen:goerli-complete'
run: $(yarn bin)/graph codegen subgraph.goerli.yaml
- name: 'graph:create:goerli-complete'
run: $(yarn bin)/graph create vsuite-goerli-complete --node http://graph-node-query:8020
- name: 'graph:deploy:goerli-complete'
run: $(yarn bin)/graph deploy vsuite-goerli-complete --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.goerli.yaml
# Deploy fast syncing testnet version
- name: 'graph:codegen:testnet'
run: $(yarn bin)/graph codegen subgraph.testnet_fast.yaml
- name: 'graph:create:testnet'
run: $(yarn bin)/graph create vsuite-testnet --node http://graph-node-query:8020
- name: 'graph:deploy:testnet'
run: $(yarn bin)/graph deploy vsuite-testnet --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.testnet_fast.yaml
- name: 'graph:clean'
run: $(yarn bin)/graph clean
# Deploy slow syncing testnet version
- name: 'graph:codegen:testnet-complete'
run: $(yarn bin)/graph codegen subgraph.testnet.yaml
- name: 'graph:create:testnet-complete'
run: $(yarn bin)/graph create vsuite-testnet-complete --node http://graph-node-query:8020
- name: 'graph:deploy:testnet-complete'
run: $(yarn bin)/graph deploy vsuite-testnet-complete --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.testnet.yaml
deploy-mainnet:
runs-on: thegraph-mainnet
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'asdf:install'
uses: asdf-vm/actions/[email protected]
- name: 'yarn:init'
run: yarn
# Deploy fast syncing mainnet version
- name: 'graph:codegen:mainnet'
run: $(yarn bin)/graph codegen subgraph.mainnet_fast.yaml
- name: 'graph:create:mainnet'
run: $(yarn bin)/graph create vsuite --node http://graph-node-query:8020
- name: 'graph:deploy:mainnet'
run: $(yarn bin)/graph deploy vsuite --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.mainnet_fast.yaml
- name: 'graph:clean'
run: $(yarn bin)/graph clean
# Deploy slow syncing mainnet version
- name: 'graph:codegen:mainnet-complete'
run: $(yarn bin)/graph codegen subgraph.mainnet.yaml
- name: 'graph:create:mainnet-complete'
run: $(yarn bin)/graph create vsuite-complete --node http://graph-node-query:8020
- name: 'graph:deploy:mainnet-complete'
run: $(yarn bin)/graph deploy vsuite-complete --version-label ${GITHUB_REF##*/} --node http://graph-node-query:8020 --ipfs http://ipfs-ipfs:5001 subgraph.mainnet.yaml