ci: publish docker image archives in release assets

This commit is contained in:
CJACK.
2026-02-17 19:51:53 +08:00
parent 05422b2449
commit 2acf58590a
2 changed files with 57 additions and 1 deletions

View File

@@ -8,10 +8,12 @@ RUN npm run build
FROM golang:1.24 AS go-builder
WORKDIR /app
ARG TARGETOS=linux
ARG TARGETARCH=amd64
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/ds2api ./cmd/ds2api
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /out/ds2api ./cmd/ds2api
FROM debian:bookworm-slim
WORKDIR /app