feat: show live build version in web UI
Build & Push Docker Image / build (push) Successful in 2m36s

- /api/version returns version, commitSha, buildDate, trashRetentionDays
- CI passes COMMIT_SHA (full), BUILD_DATE and VERSION (git tag) as
  docker build args; Dockerfile bakes them as env
- sidebar footer shows version/sha linked to the Gitea commit
- admin System tab shows version, commit link, build date, trash retention
This commit is contained in:
opencode
2026-08-02 02:13:27 +02:00
parent 2f20b1e5c2
commit 803802a5b6
11 changed files with 247 additions and 3 deletions
+7 -1
View File
@@ -27,8 +27,14 @@ jobs:
- name: Build and push
run: |
SHA=$(git rev-parse --short HEAD)
FULL_SHA=$(git rev-parse HEAD)
IMAGE="git.kubebase.de/${{ gitea.repository }}"
docker build --no-cache -t "${IMAGE}:sha-${SHA}" -t "${IMAGE}:latest" .
if [ "${{ gitea.ref_type }}" = "tag" ]; then VERSION="${{ gitea.ref_name }}"; else VERSION=""; fi
docker build --no-cache \
--build-arg COMMIT_SHA="$FULL_SHA" \
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--build-arg VERSION="$VERSION" \
-t "${IMAGE}:sha-${SHA}" -t "${IMAGE}:latest" .
docker push "${IMAGE}:sha-${SHA}"
docker push "${IMAGE}:latest"