1
0
mirror of git://f0xx.org/ac/ac-scripts synced 2026-08-09 20:59:09 +03:00

CI: allow git safe.directory for nobody-owned isolated clones in Docker.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-08-09 19:04:28 +02:00
parent 5a7b0c91d8
commit 747df03c12

View File

@@ -31,6 +31,12 @@ exec > >(tee -a "${OUT_DIR}/build.log") 2>&1
echo "==> Phase: init build_id=${BUILD_ID} channel=${OTA_CHANNEL}"
# Isolated trees are cloned by PHP-FPM (nobody); container runs as root.
if [[ -d "${ROOT}/.git" ]]; then
git config --global --add safe.directory "${ROOT}" 2>/dev/null || true
git config --global --add safe.directory '*' 2>/dev/null || true
fi
if [[ -n "${GIT_REF:-}" ]]; then
echo "==> Phase: git checkout ${GIT_REF}"
current_head="$(git rev-parse HEAD 2>/dev/null || echo "")"