feat(docker): add build version to built images

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2022-08-30 12:28:53 +02:00
parent d2b25b6cdd
commit a3c74e7310
3 changed files with 5 additions and 1 deletions

View file

@ -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 }}

View file

@ -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

View file

@ -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"
}