feat(versioning): Implemented APP_VERSION from build tags
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m35s

This commit is contained in:
2026-05-01 03:45:15 +03:00
parent fc54f7bb86
commit dd8dd7cdc2
2 changed files with 6 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ jobs:
- name: Build Docker Image - name: Build Docker Image
run: | run: |
docker build \ docker build \
--build-arg APP_VERSION=${{ gitea.ref_name }} \
-t tea.chunkbyte.com/kato/warpbox:${{ gitea.ref_name }} \ -t tea.chunkbyte.com/kato/warpbox:${{ gitea.ref_name }} \
-t tea.chunkbyte.com/kato/warpbox:latest \ -t tea.chunkbyte.com/kato/warpbox:latest \
. .

View File

@@ -1,6 +1,8 @@
# Stage 1: Build # Stage 1: Build
FROM golang:1.23-alpine AS builder FROM golang:1.23-alpine AS builder
ARG APP_VERSION=""
RUN apk add --no-cache git ca-certificates RUN apk add --no-cache git ca-certificates
WORKDIR /build WORKDIR /build
@@ -21,6 +23,9 @@ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o warpbox ./cmd/
# Stage 2: Runtime # Stage 2: Runtime
FROM alpine:3.21 FROM alpine:3.21
ARG APP_VERSION=""
ENV APP_VERSION=${APP_VERSION}
RUN apk add \ RUN apk add \
--no-cache \ --no-cache \
ca-certificates \ ca-certificates \