fix(ci): bound docs-agent git fetch operations with timeout (#110026)

This commit is contained in:
wanyongstar
2026-07-18 08:40:14 +08:00
committed by GitHub
parent ef75d4fcce
commit e244a2b2f6

View File

@@ -62,7 +62,7 @@ jobs:
fi
for attempt in 1 2 3 4 5; do
if git fetch --no-tags origin main; then
if timeout --signal=TERM --kill-after=10s 120s git fetch --no-tags origin main; then
break
fi
if [ "$attempt" = "5" ]; then
@@ -230,7 +230,7 @@ jobs:
git commit --no-verify -m "docs: refresh documentation"
for attempt in 1 2 3 4 5; do
if ! git fetch --no-tags origin "${TARGET_BRANCH}"; then
if ! timeout --signal=TERM --kill-after=10s 120s git fetch --no-tags origin "${TARGET_BRANCH}"; then
echo "Fetch attempt ${attempt} failed; retrying."
sleep $((attempt * 2))
continue