-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (30 loc) · 822 Bytes
/
blank.yml
File metadata and controls
34 lines (30 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Update Submodules
on:
push:
branches: [ main ]
schedule:
- cron: "45 10 * * *"
workflow_dispatch:
jobs:
update_submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.PAT }} # 使用个人访问令牌
- name: Update submodules
run: |
git submodule update --remote
- name: Commit changes
run: |
if git diff --exit-code; then
echo "No submodule updates detected."
else
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update submodules"
git push
fi