File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 36
36
provenance : false
37
37
cache-from : type=gha
38
38
cache-to : type=gha,mode=max
39
+ build-args : GIT_HASH=${{ github.sha }}
39
40
40
41
build-binaries :
41
42
strategy :
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ RUN npm ci
5
5
6
6
7
7
FROM node:20.15.0 AS build
8
+ ARG GIT_HASH=""
9
+ ENV GIT_HASH ${GIT_HASH}
8
10
WORKDIR /app
9
11
COPY --from=deps /app/node_modules ./node_modules
10
12
COPY . .
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import react from "@vitejs/plugin-react";
6
6
import tsconfigPaths from "vite-tsconfig-paths" ;
7
7
import * as child from "child_process" ;
8
8
9
- const commitHash = child . execSync ( "git rev-parse HEAD" ) . toString ( ) ;
9
+ const commitHash = process . env . GIT_HASH || child . execSync ( "git rev-parse HEAD" ) . toString ( ) ;
10
10
11
11
// https://vitejs.dev/config/
12
12
export default defineConfig ( async ( ) => ( {
You can’t perform that action at this time.
0 commit comments