-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (50 loc) · 1.57 KB
/
push-networks.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build external-network-pusher
on:
schedule:
- cron: 30 19 * * * # Run this every day at 19:30 UTC
workflow_dispatch:
jobs:
build-and-upload:
name: Build external-network-pusher
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read Go version from go.mod
run: echo "GO_VERSION=$(grep -E "^go\s+[0-9.]+$" go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Go Build Cache
uses: actions/cache@v3
with:
path: ~/.cache
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Run unit tests
run: make test
- name: Build binaries
run: make build
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: bin
path: .gobin
run-and-upload:
runs-on: ubuntu-latest
needs: build-and-upload
name: Run external-network-pusher and upload results
steps:
- name: Download executable
uses: actions/download-artifact@v3
with:
name: bin
- name: Set permissions to file
run: chmod +x linux/network-crawler
- name: Run external-network-pusher
run: linux/network-crawler --dry-run --bucket-name 123
continue-on-error: false