6baaf96638
Tag-triggered workflow builds multi-platform binaries, pushes a multi-arch Docker image to GHCR, bumps and releases the Helm chart, and creates a GitHub release with all binary artifacts. Adds GPL-3.0 LICENSE and version variable stamped at build time via ldflags.
13 lines
306 B
Docker
13 lines
306 B
Docker
FROM golang:1.25-alpine AS builder
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s -X main.version=${VERSION}" -o /terdut ./cmd/terdut
|
|
|
|
FROM scratch
|
|
COPY --from=builder /terdut /terdut
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/terdut"]
|