File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update submodule
2
+
3
+ on :
4
+ repository_dispatch :
5
+ types : [update-submodule]
6
+
7
+ jobs :
8
+ update-submodule :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout parent repo
12
+ uses : actions/checkout@v4
13
+ with :
14
+ ref : git-submodules
15
+ submodules : true
16
+ token : ${{ secrets.PARENT_REPO_TOKEN }}
17
+
18
+ - name : Update submodule from payload
19
+ run : |
20
+ SUBMODULE=${{ github.event.client_payload.submodule }}
21
+ echo "Updating submodule: $SUBMODULE"
22
+
23
+ git config user.name "github-actions[bot]"
24
+ git config user.email "github-actions[bot]@users.noreply.github.com"
25
+
26
+ git submodule update --remote $SUBMODULE
27
+ git add $SUBMODULE
28
+ git commit -m "Auto-update $SUBMODULE submodule to latest main" || echo "No changes to commit"
29
+ git push
You can’t perform that action at this time.
0 commit comments