Added git variables to entry point
This commit is contained in:
@@ -14,8 +14,12 @@ if [ -z "$GIT_USER_EMAIL" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use GIT_AUTHOR/COMMITTER env vars instead of git config --global,
|
# Set git identity globally so it persists for all shells (docker exec, etc.),
|
||||||
# so the root filesystem can stay read-only (no ~/.gitconfig write).
|
# not just the entrypoint process tree.
|
||||||
|
git config --global user.name "$GIT_USER_NAME"
|
||||||
|
git config --global user.email "$GIT_USER_EMAIL"
|
||||||
|
|
||||||
|
# Also set env vars for backwards compatibility.
|
||||||
export GIT_AUTHOR_NAME="$GIT_USER_NAME"
|
export GIT_AUTHOR_NAME="$GIT_USER_NAME"
|
||||||
export GIT_COMMITTER_NAME="$GIT_USER_NAME"
|
export GIT_COMMITTER_NAME="$GIT_USER_NAME"
|
||||||
export GIT_AUTHOR_EMAIL="$GIT_USER_EMAIL"
|
export GIT_AUTHOR_EMAIL="$GIT_USER_EMAIL"
|
||||||
@@ -27,7 +31,7 @@ export GIT_COMMITTER_EMAIL="$GIT_USER_EMAIL"
|
|||||||
# binaries on a Linux container). Reinstall to get the right ones.
|
# binaries on a Linux container). Reinstall to get the right ones.
|
||||||
if [ -d /workspace/frontend ] && [ -f /workspace/frontend/package.json ]; then
|
if [ -d /workspace/frontend ] && [ -f /workspace/frontend/package.json ]; then
|
||||||
echo "Installing frontend dependencies for container platform..."
|
echo "Installing frontend dependencies for container platform..."
|
||||||
cd /workspace/frontend && npm install --prefer-offline 2>/dev/null || true
|
cd /workspace/frontend && npm ci --prefer-offline 2>/dev/null || true
|
||||||
cd /workspace
|
cd /workspace
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user