File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 8
8
schedule :
9
9
- cron : " 0 0 * * *" # daily update
10
10
11
+ permissions :
12
+ contents : write # 确保有对仓库内容的写权限
13
+ pull-requests : write # 如果涉及拉取请求,也需要相应权限
14
+
11
15
jobs :
12
16
update-submodules :
13
17
runs-on : ubuntu-latest
@@ -16,12 +20,15 @@ jobs:
16
20
- name : Checkout repository
17
21
uses : actions/checkout@v3
18
22
with :
19
- submodules : recursive # update all submodules
23
+ submodules : recursive # update all submoduleswith:
24
+ fetch-depth : 0 # fetch all history for all tags and branches
20
25
21
26
- name : Update submodules to latest commit
22
27
run : |
23
28
git config --global user.name "GitHub Actions Bot"
24
29
git config --global user.email "[email protected] "
30
+ git submodule status
31
+ git submodule update --init --recursive
25
32
git submodule update --remote --merge
26
33
27
34
if [[ $(git status --porcelain) ]]; then
You can’t perform that action at this time.
0 commit comments