Skip to content

Commit

Permalink
add build action
Browse files Browse the repository at this point in the history
  • Loading branch information
ypoplavs committed Aug 18, 2022
1 parent cd3765a commit f26c022
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: build
run: make build
- name: Build and push
uses: docker/build-push-action@v2
with:
context: server
platforms: linux/amd64,linux/arm64

# - name: build
# run: make build

- name: Set up Go
uses: actions/setup-go@v2
Expand Down
2 changes: 1 addition & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG TARGETARCH
ARG TARGETOS

COPY . .
RUN RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -v -ldflags "-X github.com/kubeshop/kusk-gateway/pkg/analytics.TelemetryToken=$TELEMETRY_TOKEN" -o kusk-gateway-api
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -v -ldflags "-X github.com/kubeshop/kusk-gateway/pkg/analytics.TelemetryToken=$TELEMETRY_TOKEN" -o kusk-gateway-api

FROM --platform=$BUILDPLATFORM gcr.io/distroless/static:nonroot
COPY --from=build --chown=65532:65532 /go/src/kusk-gateway-api ./
Expand Down

0 comments on commit f26c022

Please sign in to comment.