fix(docker): inject real commit id into build via NEXT_DEPLOYMENT_ID
CI / check (push) Successful in 1m12s
CI / deploy (push) Successful in 1m41s

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:
openhands committed 2026-09-07 11:39:29 +02:00
1 parent 3e0ba73d1c
commit 1a9b361420
2 files changed
+6 -1

No files matched your search

+2 -1
View File
@@ -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