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:
@@ -31,6 +31,12 @@ exec > >(tee -a "${OUT_DIR}/build.log") 2>&1
|
|||||||
|
|
||||||
echo "==> Phase: init build_id=${BUILD_ID} channel=${OTA_CHANNEL}"
|
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
|
if [[ -n "${GIT_REF:-}" ]]; then
|
||||||
echo "==> Phase: git checkout ${GIT_REF}"
|
echo "==> Phase: git checkout ${GIT_REF}"
|
||||||
current_head="$(git rev-parse HEAD 2>/dev/null || echo "")"
|
current_head="$(git rev-parse HEAD 2>/dev/null || echo "")"
|
||||||
|
|||||||
Reference in New Issue
Block a user