Skip to content

Commit fe2ed04

Browse files
committed
ci: add submodule update workflow
1 parent 601a1bc commit fe2ed04

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Update Submodules
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
update:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
fetch-depth: 0
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Update Submodules
19+
run: |
20+
git submodule update --remote --recursive
21+
22+
- name: Commit and Push
23+
run: |
24+
git config --global user.name "github-actions[bot]"
25+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
26+
git add .
27+
git diff --quiet && git diff --staged --quiet || git commit -m "chore: update submodules to latest"
28+
git push

0 commit comments

Comments
 (0)