Skip to content

Commit bfae89f

Browse files
committed
fix(ci): dependabot submodule details
1 parent ff6c092 commit bfae89f

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/submodule.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ name: Submodule Changes
22

33
on:
44
pull_request:
5-
types:
6-
- opened
5+
# types:
6+
# - opened
7+
8+
permissions:
9+
pull-requests: write
10+
contents: read
711

812
jobs:
913
changes:
@@ -19,7 +23,14 @@ jobs:
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

0 commit comments

Comments
 (0)