延长超时时间
Some checks failed
多仓库同步流水线 / sync-repositories (push) Failing after 13m0s

This commit is contained in:
2025-11-23 22:43:36 +08:00
parent 6161f2875d
commit 66511432ed
2 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ on:
workflow_dispatch:
schedule:
# 每天凌晨1点执行
- cron: '0 1 * * *'
- cron: '0 1 * * 0'
env:
CONFIG_FILE: 'repos.yaml'

View File

@@ -88,7 +88,7 @@ def sync_repository(repo_config):
print(f"\n[1/6] 克隆目标仓库...")
result = subprocess.run(
['git', 'clone', target_url, work_dir],
capture_output=True, text=True, timeout=300
capture_output=True, text=True, timeout=3600
)
if result.returncode != 0:
print(f"❌ 克隆目标仓库失败:")
@@ -112,7 +112,7 @@ def sync_repository(repo_config):
try:
result = subprocess.run(
['git', 'fetch', 'upstream'],
capture_output=True, text=True, timeout=200
capture_output=True, text=True, timeout=3600
)
if result.returncode == 0:
break
@@ -166,7 +166,7 @@ def sync_repository(repo_config):
print(f"[6/6] 推送到目标仓库...")
result = subprocess.run(
['git', 'push', '--force', '--tags', 'origin', f'refs/heads/{branch}'],
capture_output=True, text=True, timeout=600
capture_output=True, text=True, timeout=3600
)
if result.returncode != 0:
print(f"❌ 推送到目标仓库失败:")