File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,14 @@ ARG TARGETPLATFORM TARGETOS TARGETARCH TARGETVARIANT VERSION=dev
3030# to avoid https://github.com/moby/buildkit/issues/2334
3131# We can use docker layer cache so the build is fast enogh anyway
3232# We also use per-platform GOCACHE for the same reason.
33- env GOCACHE /build/${TARGETPLATFORM}/root/.cache/go-build
33+ ENV GOCACHE /build/${TARGETPLATFORM}/root/.cache/go-build
3434
3535# Build
3636RUN --mount=target=. \
3737 --mount=type=cache,mode=0777,target=${GOCACHE} \
3838 export GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT#v} && \
39- go build -ldflags="-X 'github.com/actions-runner-controller/actions-runner-controller/build.Version=${VERSION}'" -o /out/manager main.go && \
40- go build -o /out/github-webhook-server ./cmd/githubwebhookserver
39+ go build -trimpath - ldflags="-s -w -X 'github.com/actions-runner-controller/actions-runner-controller/build.Version=${VERSION}'" -o /out/manager main.go && \
40+ go build -trimpath -ldflags= "-s -w" - o /out/github-webhook-server ./cmd/githubwebhookserver
4141
4242# Use distroless as minimal base image to package the manager binary
4343# Refer to https://github.com/GoogleContainerTools/distroless for more details
You can’t perform that action at this time.
0 commit comments