Try the macos-latest runner #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: The kubectl-gather authors | |
# SPDX-License-Identifier: Apache-2.0 | |
--- | |
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Check code | |
runs-on: macos-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: macos-latest | |
strategy: | |
matrix: | |
goos: [linux, windows, darwin] | |
goarch: [amd64, arm64] | |
exclude: | |
- goarch: arm64 | |
goos: windows | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Create build tag | |
run: git tag latest | |
- 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 }} make | |
container: | |
name: Build container | |
runs-on: macos-latest # for recent enough podman | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Create build tag | |
run: git tag latest | |
- name: Setup multi-arch podman | |
run: | | |
brew install podman | |
podman version | |
podman machine init | |
podman machine start | |
- name: Make container | |
run: make container |