-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (49 loc) · 1.17 KB
/
builds.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
60
61
name: Builds
on:
pull_request:
branches:
- master
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
workflow_dispatch:
jobs:
build_cli:
name: Build CLI
runs-on: ubuntu-20.04
strategy:
matrix:
go_os: [ linux, darwin ]
go_arch: [ amd64, arm64 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
cache: true
go-version: '1.20'
- name: Update Go modules
run: make dep
- name: Build CLI
run: BUILD_OS=${{ matrix.go_os }} BUILD_ARCH=${{ matrix.go_arch }} make
- name: Check version
run: if [[ $(make version) == *"dirty"* ]]; then exit 1; fi
build_image:
needs: build_cli
name: Build Docker image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: true
go-version: '1.20'
- name: Update Go modules
run: make dep
- name: Build Docker image
run: make image