From a2b2fd82529c305a9bac5efba6662748cd39947b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89=E9=B8=AD=E8=9B=8B?= Date: Fri, 5 Sep 2025 02:08:03 +0800 Subject: [PATCH] =?UTF-8?q?ci(workflow):=20=E6=B7=BB=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E5=88=86=E6=94=AF=E7=9A=84=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E4=BB=A5=E5=90=8C=E6=AD=A5=E9=95=9C=E5=83=8F=E4=BB=93?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 确保在同步镜像仓库时能够获取所有远程分支,而不仅仅是默认分支 --- .github/workflows/sync_mirrors_git.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sync_mirrors_git.yml b/.github/workflows/sync_mirrors_git.yml index e1cadba10..9a0533f13 100644 --- a/.github/workflows/sync_mirrors_git.yml +++ b/.github/workflows/sync_mirrors_git.yml @@ -20,6 +20,11 @@ jobs: fetch-depth: 0 # 获取完整的git历史记录 token: ${{ secrets.GITHUB_TOKEN }} + - name: Fetch all branches + run: | + git fetch --all + git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote" 2>/dev/null || true; done + - name: Set up Git run: | git config --global user.name "github-actions[bot]"