Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 16a6913

Browse files
Merge pull request #189 from docker/build-mac-arm64
Build mac arm64 binary
2 parents 3f7dbd1 + 6ef1f61 commit 16a6913

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/release-weekly-build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
env:
1919
GO111MODULE: "on"
2020
steps:
21-
- name: Set up Go 1.15
21+
- name: Set up Go 1.17
2222
uses: actions/setup-go@v1
2323
with:
24-
go-version: 1.15
24+
go-version: 1.17
2525
id: go
2626

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

56-
- name: Set up Go 1.15
56+
- name: Set up Go 1.17
5757
uses: actions/setup-go@v2
5858
with:
59-
go-version: 1.15
59+
go-version: 1.17
6060
id: go
6161

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

78+
- name: Build Mac arm64 binary
79+
if: ${{ matrix.os == 'macos-latest' }}
80+
run: make TAG_NAME=${{ github.event.inputs.tag }} -f builder.Makefile build-mac-arm64
81+
7882
- name: Upload binary artifact
7983
if: ${{ github.event.inputs.tag != '' }} # don't push artifacts if no tag is specified
8084
uses: actions/upload-artifact@v2

builder.Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ test-unit:
6060
cross:
6161
GOOS=linux GOARCH=amd64 $(GO_BUILD) -o dist/docker-scan_linux_amd64 ./cmd/docker-scan
6262
GOOS=darwin GOARCH=amd64 $(GO_BUILD) -o dist/docker-scan_darwin_amd64 ./cmd/docker-scan
63+
GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o dist/docker-scan_darwin_arm64 ./cmd/docker-scan
6364
GOOS=windows GOARCH=amd64 $(GO_BUILD) -o dist/docker-scan_windows_amd64.exe ./cmd/docker-scan
6465

66+
build-mac-arm64:
67+
mkdir -p bin
68+
GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o bin/docker-scan_darwin_arm64 ./cmd/docker-scan
69+
6570
.PHONY: build
6671
build:
6772
mkdir -p bin

0 commit comments

Comments
 (0)