Skip to content

Commit

Permalink
Merge pull request #9 from equinix-ms/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
jonkerj authored Apr 21, 2022
2 parents 72ffedf + 9d9dc54 commit 487574b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ jobs:
runs-on: ubuntu-latest
needs: tag
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: '1.17'
- name: Set up buildx
uses: docker/setup-buildx-action@v1
- name: Verify dependencies
run: go mod verify
- name: Run go vet
Expand All @@ -20,3 +22,8 @@ jobs:
version: "2022.1"
- name: Run go build
run: go build -v
- name: Build containers
uses: docker/build-push-action@v2
with:
push: false
platforms: linux/amd64,linux/arm64
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM golang:1.17 as builder
FROM --platform=$BUILDPLATFORM golang:1.17 as builder
RUN mkdir /workdir
WORKDIR /workdir
COPY . /workdir
RUN CGO_ENABLED=0 go build -o app -v main.go
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o app -v main.go

FROM scratch
COPY --from=builder /workdir/app /app
Expand Down

0 comments on commit 487574b

Please sign in to comment.