From 66511432ed7f5f34cb1293bc18ef41fee725ebc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=E5=98=89=E9=98=B3?= Date: Sun, 23 Nov 2025 22:43:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E9=95=BF=E8=B6=85=E6=97=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/multi-repo-sync.yml | 2 +- sync_repos.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/multi-repo-sync.yml b/.gitea/workflows/multi-repo-sync.yml index 1413231..8e885d6 100644 --- a/.gitea/workflows/multi-repo-sync.yml +++ b/.gitea/workflows/multi-repo-sync.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: schedule: # 每天凌晨1点执行 - - cron: '0 1 * * *' + - cron: '0 1 * * 0' env: CONFIG_FILE: 'repos.yaml' diff --git a/sync_repos.py b/sync_repos.py index b5abd03..3a26499 100644 --- a/sync_repos.py +++ b/sync_repos.py @@ -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"❌ 推送到目标仓库失败:")