We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d886a5 commit 3afe046Copy full SHA for 3afe046
1 file changed
.github/workflows/sync-to-gitee.yml
@@ -0,0 +1,37 @@
1
+name: Sync to Gitee
2
+
3
+# 显式声明最小化权限
4
+permissions:
5
+ contents: write # 必须的写入权限(用于push)
6
+ actions: read # 可选监控权限
7
8
+on:
9
+ schedule:
10
+ - cron: '0 0 * * *'
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ types: [ closed ]
15
16
+ workflow_dispatch:
17
18
+env:
19
+ GITEE_REPO: "https://${{ secrets.GITEE_USERNAME }}:${{ secrets.GITEE_TOKEN }}@gitee.com/osard/DialogUtilsLib.git"
20
21
+jobs:
22
+ sync-to-gitee:
23
+ runs-on: ubuntu-latest
24
25
+ permissions:
26
+ contents: write # 仅保留必要的写入权限
27
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
34
+ - name: Mirror to Gitee
35
+ run: |
36
+ git remote add gitee ${{ env.GITEE_REPO }}
37
+ git push --mirror --force gitee
0 commit comments