We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19d3d5d commit 854980bCopy full SHA for 854980b
.github/workflows/sync.yml
@@ -0,0 +1,30 @@
1
+name: Sync from Uni-CTR
2
+
3
+on:
4
+ schedule:
5
+ - cron: '0 2 * * *' # 每天凌晨2点(UTC)
6
+ workflow_dispatch: # 允许手动触发
7
8
+jobs:
9
+ sync_repo:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ # Step 1: 检出目标仓库
14
+ - name: Checkout Destination Repo
15
+ uses: actions/checkout@v3
16
+ with:
17
+ token: ${{ secrets.GITHUB_TOKEN }}
18
+ fetch-depth: 0
19
20
+ # Step 2: 添加源仓库为远程仓库
21
+ - name: Add Source Repo as Remote
22
+ run: |
23
+ git remote add source https://github.com/archersama/Uni-CTR.git
24
+ git fetch source
25
26
+ # Step 3: 同步源仓库内容到目标仓库
27
+ - name: Sync from Source to Destination
28
29
+ git reset --hard source/main # 将目标仓库重置为源仓库的 main 分支内容
30
+ git push origin main --force
0 commit comments