File tree 3 files changed +55
-4
lines changed
3 files changed +55
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy the Subgraph
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ network :
7
+ description : The network to deploy the subgraph to
8
+ required : true
9
+ default : ' arbitrum-goerli'
10
+ type : choice
11
+ options :
12
+ - arbitrum-goerli
13
+ - arbitrum
14
+
15
+ permissions :
16
+ contents : read
17
+
18
+ jobs :
19
+ buildAndDeploy :
20
+ runs-on : ubuntu-latest
21
+ environment : kleros-org-subgraph
22
+ steps :
23
+ - name : Harden Runner
24
+ uses : step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
25
+ with :
26
+ egress-policy : audit
27
+
28
+ - name : Checkout code
29
+ uses : actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
30
+
31
+ - name : Set up Node.js
32
+ uses : actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
33
+ with :
34
+ node-version : 16
35
+
36
+ - name : Install the dependencies
37
+ run : yarn install
38
+
39
+ - name : Build the subgraph
40
+ run : |
41
+ yarn codegen
42
+ yarn build
43
+
44
+ - name : Authenticate with TheGraph
45
+ run : yarn graph auth "${{ secrets.SUBGRAPH_AUTH_TOKEN }}" --product hosted-service
46
+
47
+ - name : Deploy the subgraph
48
+ run : yarn deploy:${{ inputs.network }}
Original file line number Diff line number Diff line change 10
10
## Build
11
11
12
12
``` bash
13
- $ yarn
13
+ # update subgraph.yml using the contract deployment artifacts
14
+ $ yarn update:arbitrum-goerli
14
15
15
16
$ yarn codegen
16
17
@@ -30,5 +31,5 @@ $ yarn run graph auth --product hosted-service
30
31
### Deployment
31
32
32
33
``` bash
33
- yarn deploy
34
+ yarn deploy:arbitrum-goerli
34
35
```
Original file line number Diff line number Diff line change 2
2
"name" : " @kleros/kleros-v2-subgraph" ,
3
3
"license" : " MIT" ,
4
4
"scripts" : {
5
- "update" : " ./scripts/update.sh" ,
5
+ "update:arbitrum-goerli" : " ./scripts/update.sh arbitrumGoerli arbitrum-goerli" ,
6
+ "update:arbitrum" : " ./scripts/update.sh arbitrum arbitrum" ,
6
7
"codegen" : " graph codegen" ,
7
8
"build" : " graph build" ,
8
- "deploy" : " graph deploy --product hosted-service kleros/kleros-v2-core-arbitrum-goerli" ,
9
+ "deploy:arbitrum-goerli" : " graph deploy --product hosted-service kleros/kleros-v2-core-arbitrum-goerli" ,
10
+ "deploy:arbitrum" : " graph deploy --product hosted-service kleros/kleros-v2-core-arbitrum" ,
9
11
"create-local" : " graph create --node http://localhost:8020/ kleros/kleros-v2-core-local" ,
10
12
"remove-local" : " graph remove --node http://localhost:8020/ kleros/kleros-v2-core-local" ,
11
13
"deploy-local" : " graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/kleros-v2-core-local --version-label v$(date +%s)" ,
You can’t perform that action at this time.
0 commit comments