Skip to content
This repository was archived by the owner on Jan 25, 2026. It is now read-only.

Commit fb87450

Browse files
authored
ci: add submodule auto update
1 parent 9003617 commit fb87450

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Update Submodule
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update-main-submodule:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Main Repository
13+
uses: actions/checkout@v3
14+
with:
15+
repository: PCL-Community/PCL2-CE
16+
token: ${{ secrets.UPDATE_PAT_TOKEN }}
17+
path: repo
18+
19+
- name: Update Submodule
20+
working-directory: repo
21+
run: |
22+
git config user.name "github-actions"
23+
git config user.email "github-actions@users.noreply.github.com"
24+
git submodule update --remote PCL.Core
25+
git add PCL.Core
26+
if git diff --cached --quiet; then
27+
echo "The submodule is already at the latest commit"
28+
else
29+
git commit -m "chore(submodule): update to ${{ github.sha }}"
30+
git push origin HEAD:main
31+
fi

0 commit comments

Comments
 (0)