forked from moby/moby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple CI script to build binaries
- Loading branch information
1 parent
c46dc64
commit 88a8677
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
arch: | ||
- amd64 | ||
- arm64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.23" | ||
- run: | | ||
cp vendor.mod go.mod && cp vendor.sum go.sum | ||
go build -o bin/dockerd-${{ matrix.arch }} ./cmd/dockerd | ||
env: | ||
GOOS: darwin | ||
GOARCH: ${{ matrix.arch }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.arch }} | ||
path: bin/* | ||
- uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: bin/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |