diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 229d09f..c8cc49c 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index bf2db1f..01b9334 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,7 @@ COPY --from=dependencies /app/node_modules ./node_modules COPY . . ENV NODE_ENV=production +ENV BUILD_TIME=${BUILD_TIME} # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry @@ -63,6 +64,7 @@ WORKDIR /app ENV NODE_ENV=production ENV PORT=3000 ENV HOSTNAME="0.0.0.0" +ENV BUILD_TIME=${BUILD_TIME} # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 53a729b..bd9ac4e 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -1,6 +1,7 @@ import DatasetsList from "@/components/DatasetsList"; import CreateDatasetModal from "@/components/CreateDatasetModal"; import { AdminTokenForm } from "@/components/AdminTokenForm"; +import BuildInfo from "@/components/BuildInfo"; import { requireAdmin } from "@/lib/auth"; import { redirect } from "next/navigation"; import Link from "next/link"; @@ -30,6 +31,10 @@ export default async function AdminPage() { +
+ Build Time: {buildDate.toLocaleString()} ({timeAgo}) +
+