Skip to content

Commit b22244b

Browse files
committed
ci: comment details on dependabot submodule bump PRs
1 parent 8b70fc7 commit b22244b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/submodule.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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 == 'c-dilks' # FIXME
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+
git diff origin/${{ github.base_rev }} --submodule=log | tee changes.txt
22+
echo "changes<<EOF" >> $GITHUB_OUTPUT
23+
cat changes.txt >> $GITHUB_OUTPUT
24+
echo "EOF" >> $GITHUB_OUTPUT
25+
- name: comment
26+
uses: actions/github-script@v8
27+
with:
28+
script: |
29+
github.rest.issues.createComment({
30+
issue_number: context.issue.number,
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
body: `## Submodule Changes\n\n\`\`\`\n${{ steps.changes.outputs.changes }}\n\`\`\``
34+
})

0 commit comments

Comments
 (0)