feat: add BuildInfo component to display build time and update Docker workflow to pass build time as environment variable

This commit is contained in:
averel10
2026-03-13 09:18:30 +01:00
parent 59cacb832d
commit 4aac0b549b
4 changed files with 45 additions and 0 deletions

View File

@@ -36,6 +36,10 @@ jobs:
type=ref,event=branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Get build time
id: buildtime
run: echo "BUILD_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
@@ -43,5 +47,7 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_TIME=${{ steps.buildtime.outputs.BUILD_TIME }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max