fix(docker): inject real commit id into build via NEXT_DEPLOYMENT_ID
next.config.ts falls back to `git rev-parse HEAD`, but the build context has no .git (excluded by .dockerignore), so every CI build printed fatal git errors and stamped the release as "unknown". Pass the deploy commit sha as a NEXT_DEPLOYMENT_ID build-arg so git is never invoked and the actual commit reaches NEXT_PUBLIC_CMS_RELEASE and deploymentId.
This commit is contained in:
1 parent
3e0ba73d1c
commit
1a9b361420
2 files changed
+6
-1
No files matched your search
@@ -74,7 +74,8 @@ pnpm install --frozen-lockfile
|
||||
pnpm exec playwright install chromium
|
||||
|
||||
echo "Building $image"
|
||||
DOCKER_BUILDKIT=1 docker build --network=host --progress=plain --cache-from epicnext-cms:latest -t "$image" .
|
||||
DOCKER_BUILDKIT=1 docker build --network=host --progress=plain --cache-from epicnext-cms:latest \
|
||||
--build-arg NEXT_DEPLOYMENT_ID="$sha" -t "$image" .
|
||||
check_current
|
||||
pnpm db:migrate
|
||||
check_current
|
||||
|
||||
Reference in new issue
Block a user