-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (45 loc) · 1.06 KB
/
ci.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
# SPDX-FileCopyrightText: The kubectl-gather authors
# SPDX-License-Identifier: Apache-2.0
---
name: CI
on:
push:
pull_request:
env:
CGO_ENABLED: "0"
jobs:
lint:
name: Check code
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
build-matrix:
name: Build binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Build binary
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build