test this
This commit is contained in:
parent
b502695b25
commit
2d42f39610
19
.github/workflows/mirror.yml
vendored
19
.github/workflows/mirror.yml
vendored
@ -15,19 +15,20 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: clone remote
|
- name: clone remote
|
||||||
shell: pwsh
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email 3695888@qq.com
|
git config --global user.email 3695888@qq.com
|
||||||
git config --global user.name shenjack-action
|
git config --global user.name shenjack-action
|
||||||
git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git
|
git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git
|
||||||
git fetch gitea
|
git fetch gitea
|
||||||
$branches = git branch -r | Select-String -Pattern 'gitea'
|
for branch in $(git branch -r | grep 'gitea'); do
|
||||||
foreach ($branch in $branches) {
|
branchName=${branch#*/}
|
||||||
$branchName = $branch -replace 'gitea/', ''
|
if ! git branch | grep -q $branchName; then
|
||||||
$branchName = $branchName.Trim()
|
git branch --track $branchName $branch
|
||||||
if (!(git branch | Select-String -Pattern $branchName)) {
|
fi
|
||||||
git branch --track $branchName $branch.Trim()
|
done
|
||||||
}
|
|
||||||
}
|
- name: push to github
|
||||||
|
run: |
|
||||||
git pull --all
|
git pull --all
|
||||||
git push origin --all --force
|
git push origin --all --force
|
Loading…
Reference in New Issue
Block a user