Fix kokoro v3 #22
Workflow file for this run
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
name: Cross-Compile skaffold on MacOS | |
# Triggers the workflow on push or pull request events | |
on: [push, pull_request] | |
permissions: read-all | |
concurrency: | |
group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
build: | |
name: Cross-Compile skaffold on MacOS | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
platforms: [linux-amd64 darwin-amd64 windows-amd64.exe linux-arm64 darwin-arm64] | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.4 | |
id: go | |
# Retrieve build locations with `go env` | |
# <https://markphelps.me/posts/speed-up-your-go-builds-with-actions-cache/> | |
- id: go-cache-paths | |
run: | | |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT | |
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
${{ steps.go-cache-paths.outputs.go-build }} | |
${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
# - name: Install docker | |
# run: | | |
# pushd /tmp | |
# wget https://desktop.docker.com/mac/main/amd64/179585/Docker.dmg | |
# sudo hdiutil attach Docker.dmg | |
# sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --user=$(whoami) | |
# sudo hdiutil detach /Volumes/Docker | |
# popd | |
- name: Make and install Skaffold binary from current PR | |
run: | | |
brew install --cask docker | |
# Check golang version | |
echo "Found golang version $(go version) from path $(which go)" | |
make ./out/VERSION | |
make ./out/skaffold-${{ matrix.platforms }} |