Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #189 from docker/build-mac-arm64
Browse files Browse the repository at this point in the history
Build mac arm64 binary
  • Loading branch information
StefanScherer authored Dec 22, 2021
2 parents 3f7dbd1 + 6ef1f61 commit 16a6913
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release-weekly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
env:
GO111MODULE: "on"
steps:
- name: Set up Go 1.15
- name: Set up Go 1.17
uses: actions/setup-go@v1
with:
go-version: 1.15
go-version: 1.17
id: go

- name: Checkout code into the Go module directory
Expand Down Expand Up @@ -53,10 +53,10 @@ jobs:
# Only the CLI is needed to run docker-scan e2e
run: brew install docker

- name: Set up Go 1.15
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.17
id: go

- name: Checkout code into the Go module directory
Expand All @@ -75,6 +75,10 @@ jobs:
E2E_HUB_TOKEN: ${{ secrets.E2E_HUB_TOKEN }}
run: make TAG_NAME=${{ github.event.inputs.tag }} -f builder.Makefile build test-unit e2e

- name: Build Mac arm64 binary
if: ${{ matrix.os == 'macos-latest' }}
run: make TAG_NAME=${{ github.event.inputs.tag }} -f builder.Makefile build-mac-arm64

- name: Upload binary artifact
if: ${{ github.event.inputs.tag != '' }} # don't push artifacts if no tag is specified
uses: actions/upload-artifact@v2
Expand Down
5 changes: 5 additions & 0 deletions builder.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ test-unit:
cross:
GOOS=linux GOARCH=amd64 $(GO_BUILD) -o dist/docker-scan_linux_amd64 ./cmd/docker-scan
GOOS=darwin GOARCH=amd64 $(GO_BUILD) -o dist/docker-scan_darwin_amd64 ./cmd/docker-scan
GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o dist/docker-scan_darwin_arm64 ./cmd/docker-scan
GOOS=windows GOARCH=amd64 $(GO_BUILD) -o dist/docker-scan_windows_amd64.exe ./cmd/docker-scan

build-mac-arm64:
mkdir -p bin
GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o bin/docker-scan_darwin_arm64 ./cmd/docker-scan

.PHONY: build
build:
mkdir -p bin
Expand Down

0 comments on commit 16a6913

Please # to comment.