Skip to content

Commit d3c1416

Browse files
committed
Add GitHub Actions for auto submodule update
1 parent 35b43ef commit d3c1416

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Auto Update Submodules
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
update-submodules:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout main repo
15+
uses: actions/checkout@v3
16+
with:
17+
submodules: true
18+
fetch-depth: 0
19+
20+
- name: Configure Git
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
25+
- name: Update submodules
26+
run: |
27+
git submodule update --remote --merge
28+
git add .
29+
git commit -m "Auto update submodules" || echo "No changes"
30+
31+
- name: Push updates
32+
run: |
33+
git push origin main

0 commit comments

Comments
 (0)