Skip to content

Commit 5a8a3f0

Browse files
committed
Update submodules action
1 parent f975ae1 commit 5a8a3f0

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: Update Submodules
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
update-submodules:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
token: ${{ secrets.PAT }}
15+
submodules: true
16+
17+
- name: Update all submodules to latest commit
18+
run: |
19+
git submodule update --init --recursive
20+
git submodule update --remote --merge
21+
22+
- name: Commit and push changes
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+
27+
git add .
28+
if git diff --cached --quiet; then
29+
echo "No changes to commit"
30+
else
31+
git commit -m "Update submodules to latest commit"
32+
git push origin HEAD
33+
fi

0 commit comments

Comments
 (0)