File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
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
+ branches : [ master ]
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
You can’t perform that action at this time.
0 commit comments