Fix ci
All checks were successful
Deploy and Push Docker Image / BuildAndPush (push) Successful in 48s
All checks were successful
Deploy and Push Docker Image / BuildAndPush (push) Successful in 48s
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
ARG BUILDPLATFORM
|
||||
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
@ -6,10 +7,14 @@ WORKDIR /app
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build the Go binary statically
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o weewoowebhook /app/cmd/wee_woo_webhook/main.go
|
||||
# Build statically for Linux
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
FROM scratch
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -a -installsuffix cgo -o weewoowebhook /app/cmd/wee_woo_webhook/main.go
|
||||
|
||||
FROM alpine
|
||||
|
||||
# Copy statically built binary from the builder
|
||||
COPY --from=builder /app/weewoowebhook /weewoowebhook
|
||||
|
||||
Reference in New Issue
Block a user