From ab32fcc400c9fd796413826e8f024f05a8790b99 Mon Sep 17 00:00:00 2001 From: copilotcoder Date: Sun, 7 Jun 2026 08:14:14 -0400 Subject: [PATCH] More CICD fixes again again again again again again again again again again again again again again again again again again Signed-off-by: copilotcoder --- Dockerfile.cicd | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile.cicd b/Dockerfile.cicd index a146cfb..9e1b447 100644 --- a/Dockerfile.cicd +++ b/Dockerfile.cicd @@ -178,15 +178,17 @@ RUN echo "=== Installing Backend Package in Development Mode ===" && \ WORKDIR /workspace RUN echo "=== Installing Pre-commit Hook Environments ===" && \ if [ -f ".pre-commit-config.yaml" ]; then \ - # pre-commit expects a git repository; create a temporary one for CI image prewarming. - git init /workspace >/dev/null 2>&1 || true && \ - cd backend && \ + # pre-commit requires a git repo at runtime; keep it in the final image. + git config --global user.email "ci@cicd" && \ + git config --global user.name "CICD" && \ + git init /workspace && \ + git -C /workspace add -A && \ + cd /workspace/backend && \ if uv run pre-commit install-hooks; then \ echo "✓ Pre-commit hook environments installed successfully"; \ else \ echo "⚠ pre-commit hook prewarming failed; continuing"; \ - fi && \ - rm -rf /workspace/.git; \ + fi; \ else \ echo "No .pre-commit-config.yaml found, skipping hook installation"; \ fi