File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Submodule Changes
2+
3+ on :
4+ pull_request :
5+ types :
6+ - opened
7+
8+ jobs :
9+ changes :
10+ name : Submodule Changes
11+ if : github.actor == 'dependabot[bot]'
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v6
15+ with :
16+ fetch-depth : 0
17+ submodules : true
18+ - name : get changes
19+ id : changes
20+ run : |
21+ for sm in $(grep 'path = ' .gitmodules | awk '{print $3}'); do
22+ git diff origin/${{ github.base_ref }} --submodule=log -- $sm | tee -a changes.txt
23+ done
24+ echo "changes<<EOF" >> $GITHUB_OUTPUT
25+ cat changes.txt >> $GITHUB_OUTPUT
26+ echo "EOF" >> $GITHUB_OUTPUT
27+ - name : comment
28+ uses : actions/github-script@v8
29+ with :
30+ script : |
31+ github.rest.issues.createComment({
32+ issue_number: context.issue.number,
33+ owner: context.repo.owner,
34+ repo: context.repo.repo,
35+ body: `## Submodule Changes\n\n\`\`\`\n${{ steps.changes.outputs.changes }}\n\`\`\``
36+ })
You can’t perform that action at this time.
0 commit comments