This commit is contained in:
@@ -10,7 +10,7 @@ on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# 每天凌晨1点执行
|
||||
- cron: '0 1 * * *'
|
||||
- cron: '0 1 * * 0'
|
||||
|
||||
env:
|
||||
CONFIG_FILE: 'repos.yaml'
|
||||
|
||||
@@ -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"❌ 推送到目标仓库失败:")
|
||||
|
||||
Reference in New Issue
Block a user