forked from gtaschuk/graph-deploy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
43 lines (43 loc) · 1.56 KB
/
action.yml
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
name: "Graph Deploy"
description: "Deploy a subgraph to thegraph.com to index Ethereum and IPFS"
branding:
icon: "upload-cloud"
color: "blue"
inputs:
graph_access_token:
description: "Your access token to deploy to the hosted graph"
required: false
graph_deploy_key:
description: "Your deploy key for the subgraph studio"
required: false
graph_version_label:
description: "Your version label for subgraph studio"
required: false
graph_subgraph_name:
description: "The name of the subgraph"
required: true
graph_account:
description: "The account or organization that the subgraph is owned by"
required: true
graph_config_file:
description: "The config file you will use to deploy"
required: false
default: subgraph.yml
graph_deploy_studio:
description: "Deploy the subgraph to studio? (true/false)"
required: false
default: false
outputs:
success:
description: "The Success/Failure of the action"
runs:
using: "composite"
steps:
- id: deploy
run: |
if [ "${{inputs.graph_deploy_studio}}" = "true" ]; then
pnpm graph deploy --studio --deploy-key ${{inputs.graph_deploy_key}} ${{inputs.graph_subgraph_name}} ${{inputs.graph_config_file}} --version-label ${{inputs.graph_version_label}}
else
pnpm graph deploy --access-token ${{inputs.graph_access_token}} ${{inputs.graph_account}}/${{inputs.graph_subgraph_name}} ${{inputs.graph_config_file}} --ipfs https://api.thegraph.com/ipfs/api/v0/ --node https://api.thegraph.com/deploy/
fi
shell: bash