From e244a2b2f6d4a377f95bd2e95356dc5722f593e7 Mon Sep 17 00:00:00 2001 From: wanyongstar Date: Sat, 18 Jul 2026 08:40:14 +0800 Subject: [PATCH] fix(ci): bound docs-agent git fetch operations with timeout (#110026) --- .github/workflows/docs-agent.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-agent.yml b/.github/workflows/docs-agent.yml index 1e0da02027e5..2e6d62889603 100644 --- a/.github/workflows/docs-agent.yml +++ b/.github/workflows/docs-agent.yml @@ -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