-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (44 loc) · 1.58 KB
/
crawler.yml
File metadata and controls
48 lines (44 loc) · 1.58 KB
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: crawler
on:
workflow_dispatch:
# schedule:
# - cron: '0 6 * * *' # Every day at 6:00 AM UTC.
jobs:
crawl-network:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Begin crawling
run: |
nix develop --command \
cargo run --release --features crawler --bin crawler -- --seed-addrs "dnsseed.z.cash" "dnsseed.str4d.xyz" "mainnet.seeder.zfnd.org" "mainnet.is.yolo.money" --rpc-addr 127.0.0.1:54321 &
# After 30 min, query rpc and send SIGINT.
sleep 30m
curl --data-binary '{"jsonrpc": "2.0", "id":0, "method": "getmetrics", "params": [] }' -H 'content-type: application/json' http://127.0.0.1:54321/ > latest.json
kill -2 $(pidof crawler)
- name: Check for error
run: |
# If the result contains any error, fail workflow
if grep "error" latest.json; then
echo "Aborting. Crawler results contained an error"
exit 1
fi
cat latest.json
- uses: actions/upload-artifact@v3
with:
name: latest-result
path: latest.json
call-build-viz-state-workflow:
needs: [ crawl-network ]
uses: runziggurat/ziggurat-core/.github/workflows/build-viz-state.yml@main
with:
filter: Zcash
call-process-results-workflow:
needs: [ call-build-viz-state-workflow ]
uses: runziggurat/ziggurat-core/.github/workflows/process-results.yml@main
with:
name: crawler
extension: json
repository: zcash
secrets:
gcp_credentials: ${{ secrets.GCP_CREDENTIALS }}