mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-16 03:33:25 +08:00
ci(workflow): 添加获取所有分支的步骤以同步镜像仓库
确保在同步镜像仓库时能够获取所有远程分支,而不仅仅是默认分支
This commit is contained in:
5
.github/workflows/sync_mirrors_git.yml
vendored
5
.github/workflows/sync_mirrors_git.yml
vendored
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user