We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e363c47 commit 2914f3eCopy full SHA for 2914f3e
.github/workflows/docker.yml
@@ -54,3 +54,5 @@ jobs:
54
labels: ${{ steps.meta.outputs.labels }}
55
cache-from: type=gha
56
cache-to: type=gha,mode=max
57
+ build-args: |
58
+ VERSION=${{ github.ref_type == 'tag' && github.ref_name || format('main-{0}', github.sha) }}
Dockerfile
@@ -1,12 +1,19 @@
1
# Multi-stage Dockerfile for GPTdash
2
+ARG VERSION=unknown
3
+
4
# Stage 1: Build frontend
5
FROM node:24-alpine AS frontend
6
+ARG VERSION
7
WORKDIR /app/frontend
8
9
COPY frontend/package*.json ./
10
RUN npm ci
11
12
COPY frontend/ ./
13
14
+# Generate version.ts file like the Makefile does
15
+RUN echo "export const VERSION = \"$VERSION\";" > src/version.ts
16
17
RUN npm run build
18
19
# Stage 2: Build Go backend with embedded frontend
0 commit comments