File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,12 @@ name: Submodule Changes
22
33on :
44 pull_request :
5- types :
6- - opened
5+ # types:
6+ # - opened
7+
8+ permissions :
9+ pull-requests : write
10+ contents : read
711
812jobs :
913 changes :
1923 id : changes
2024 run : |
2125 for sm in $(grep 'path = ' .gitmodules | awk '{print $3}'); do
22- git diff origin/${{ github.base_ref }} --submodule=log -- $sm | tee -a changes.txt
26+ shas=$(git diff origin/${{ github.base_ref }} --submodule=short -- $sm)
27+ if [ -n "$shas" ]; then
28+ git diff origin/${{ github.base_ref }} --submodule=log -- $sm | tee -a changes.txt
29+ pushd $sm
30+ echo "Files changes:" | tee -a changes.txt
31+ git diff --name-only $shas | tee -a changes.txt
32+ popd
33+ fi
2334 done
2435 echo "changes<<EOF" >> $GITHUB_OUTPUT
2536 cat changes.txt >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments