-
Notifications
You must be signed in to change notification settings - Fork 137
52 lines (42 loc) · 1.07 KB
/
get-contracts.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
name: Get contracts
on:
workflow_call:
inputs:
chain:
required: true
type: string
secrets:
FLOWDIVER_API_KEY:
required: true
env:
GO_VERSION: '1.22'
concurrency:
group: ${{ github.workflow }}-${{ github.run_id }}-${{ inputs.chain }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Make output dirs
run: |
mkdir tmp
# Get contracts
- name: Download contracts
env:
FLOWDIVER_API_KEY: ${{ secrets.FLOWDIVER_API_KEY }}
working-directory: ./tools/get-contracts
run: |
go run . --chain=${{ inputs.chain }} --apiKey="$FLOWDIVER_API_KEY" > ../../tmp/contracts.csv
# Upload
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.chain }}-contracts
path: |
./tmp/contracts.csv