-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (43 loc) · 1.31 KB
/
deploy-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
name: Deploy subgraph
on:
workflow_dispatch:
inputs:
network:
description: 'Network to deploy to'
required: true
type: choice
options:
- arbitrum-one
- arbitrum_sepolia
- avalanche
- base
- bsc
- mainnet
- flare
- mumbai
- oasis_sapphire
- matic
- sepolia
- songbird
- linea
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix develop -c rainix-sol-prelude
- run: nix develop -c graph codegen
working-directory: subgraph
- run: nix develop -c graph build --network ${{ inputs.network }}
working-directory: subgraph
- run: nix develop -c goldsky login --token ${{ secrets.CI_GOLDSKY_TOKEN }}
# Check if the repo is clean before deploying.
- run: git diff --exit-code -- . ':(exclude)subgraph/subgraph.yaml'
- run: >
nix develop -c goldsky subgraph deploy "ob4-${{ inputs.network }}/$(date -Idate)-$(openssl rand -hex 2)"
working-directory: subgraph