-
Notifications
You must be signed in to change notification settings - Fork 32
44 lines (36 loc) · 1.02 KB
/
build.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
name: Funnel Build and Cache
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Check out code
uses: actions/checkout@v2
- name: Cache Funnel binary
uses: actions/cache@v3
with:
path: ./funnel
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-funnel-bin-${{ github.ref }}
${{ runner.os }}-funnel-bin-
- name: Build Funnel (if cache doesn't exist)
run: |
if [ ! -f ./funnel ]; then
make build
fi
- name: Cache Funnel binary (after build)
uses: actions/cache@v3
with:
path: ./funnel
key: ${{ runner.os }}-funnel-bin-${{ hashFiles('**/go.sum') }}-${{ github.ref }}
- name: Upload Funnel binary as artifact
uses: actions/upload-artifact@v4
with:
name: funnel
path: funnel