File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test & Build
2+
3+ on :
4+ push :
5+ branches : [ 'master' ]
6+ pull_request :
7+ branches : [ 'master' ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ go :
12+ name : Test & Build Go
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : checkout
16+ uses : actions/checkout@v4
17+ # toolchain comes from the image the Dockerfile builds with, so ci can't
18+ # drift from the release build
19+ - name : vet, test & build
20+ run : |
21+ docker run --rm -v "$PWD":/build -w /build -e CGO_ENABLED=0 golang:1.12 \
22+ sh -c 'go vet ./... && go test ./... && go build -o agent .'
23+
24+ docker :
25+ name : Build docker
26+ needs : go
27+ runs-on : ubuntu-latest
28+ steps :
29+ - name : checkout
30+ uses : actions/checkout@v4
31+ # same arch matrix deploy-image.sh releases; go cross-compiles so no
32+ # emulation is needed
33+ - name : build release architectures
34+ run : |
35+ docker build --build-arg GOARCH=amd64 -t agent:amd64 .
36+ docker build --build-arg GOARCH=arm64 -t agent:arm64 .
37+ docker build --build-arg GOARCH=arm --build-arg GOARM=7 -t agent:armv7 .
38+ docker build --build-arg GOARCH=arm --build-arg GOARM=6 -t agent:armv6 .
You can’t perform that action at this time.
0 commit comments