Add mirror workflow for scheduled and manual runs
This commit is contained in:
parent
238c293ba9
commit
2541179d38
28
.github/workflows/mirror.yml
vendored
Normal file
28
.github/workflows/mirror.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0,20,40 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
pull_remote:
|
||||
name: mirror shenjack.top
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: just checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: clone remote
|
||||
shell: pwsh
|
||||
run: |
|
||||
git config --global user.email 3695888@qq.com
|
||||
git config --global user.name shenjack-action
|
||||
git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git
|
||||
git fetch gitea
|
||||
for branch in $(git branch -r | grep -v '\->'); do
|
||||
git branch --track ${branch#origin/} $branch
|
||||
done
|
||||
git pull --all
|
||||
git push origin --all
|
Loading…
Reference in New Issue
Block a user