add version information
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
Gitea Actions Demo / build-and-test (push) Failing after 12m31s

This commit is contained in:
2026-10-24 02:08:56 +02:00
parent b3530cec7b
commit 8ef3e201d6
9 changed files with 120 additions and 12 deletions
+4 -1
View File
@@ -9,8 +9,11 @@ COPY go.mod go.sum ./
RUN go mod download
# Copy the source code
COPY . .
ARG VERSION="dev"
ARG COMMIT="unset"
ARG DATE="unset"
# Build the Go application (strip debug info for smaller size)
RUN go build -trimpath -ldflags="-s -w" -o kontor cmd/kontor/main.go
RUN go build -trimpath -ldflags="-s -w -X kontor-api-gin/internal/globals.Version=${VERSION} -X kontor-api-gin/internal/globals.Commit=${COMMIT} -X kontor-api-gin/internal/globals.Date=${DATE}" -o kontor cmd/kontor/main.go
# ---------- Stage 2: Final ----------
FROM alpine:latest