diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 99a123dea..4124e0eff 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -46,3 +46,5 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + BUILD_VERSION=${{ github.event.head_commit.id }} diff --git a/Dockerfile b/Dockerfile index 2339cf8ed..1b5b02672 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,13 @@ # BUILD FROM node:18-alpine AS builder +ARG BUILD_VERSION=CLIENT_VERSION_MISSING ENV NEXT_TELEMETRY_DISABLED=1 WORKDIR /app COPY . ./ RUN yarn install --immutable && \ + sed -i "s/CLIENT_VERSION_MISSING/${BUILD_VERSION}/" src/version.json && \ yarn build:for-real-backend # RUNNER diff --git a/src/version.json b/src/version.json index 3a4216eb2..216602077 100644 --- a/src/version.json +++ b/src/version.json @@ -1,5 +1,5 @@ { - "version": "0.0", + "version": "CLIENT_VERSION_MISSING", "sourceCodeUrl": "https://github.com/hedgedoc/react-client", "issueTrackerUrl": "https://github.com/hedgedoc/react-client/issues" }