feat: show live build version in web UI
Build & Push Docker Image / build (push) Successful in 2m36s
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:
@@ -37,6 +37,20 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/HealthStatus"
|
||||
|
||||
/version:
|
||||
get:
|
||||
operationId: getVersion
|
||||
tags: [health]
|
||||
summary: Build version information
|
||||
description: Returns the running build version, commit SHA and build date
|
||||
responses:
|
||||
"200":
|
||||
description: Version information
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/VersionInfo"
|
||||
|
||||
/tools:
|
||||
get:
|
||||
operationId: listTools
|
||||
@@ -660,6 +674,19 @@ components:
|
||||
required:
|
||||
- status
|
||||
|
||||
VersionInfo:
|
||||
type: object
|
||||
required: [version]
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
commitSha:
|
||||
type: ["string", "null"]
|
||||
buildDate:
|
||||
type: ["string", "null"]
|
||||
trashRetentionDays:
|
||||
type: integer
|
||||
|
||||
AuthMode:
|
||||
type: object
|
||||
required: [mode]
|
||||
|
||||
Reference in New Issue
Block a user