-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.55 KB
/
deploy-spn-mainnet-graph.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Deploy SPN Mainnet Longtail graph
on:
push:
branches:
- development
paths:
- 'lib/**'
- 'config/**'
- 'cmd/graphql.ethereum/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout code
uses: actions/checkout@v2
- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.23.2'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y zip
- name: Build lambda zip
run: |
cd cmd/graphql.ethereum
make lambda
- name: Deploy to AWS Lambda
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ap-southeast-2
run: |
aws lambda update-function-code --function-name longtail-mainnet-graph \
--zip-file fileb://cmd/graphql.ethereum/bootstrap.zip >&2 >/dev/null