Skip to content

Commit 053553c

Browse files
committed
devops: add workflow to rebuild generated files on Dependabot PRs
Updates license files for bundles etc.
1 parent 24edbf7 commit 053553c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Dependabot: rebuild generated files"
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
jobs:
8+
rebuild:
9+
name: Rebuild generated files
10+
runs-on: ubuntu-latest
11+
if: github.actor == 'dependabot[bot]'
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v6
16+
with:
17+
ref: ${{ github.head_ref }}
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- uses: actions/setup-node@v6
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build
26+
run: npm run build
27+
28+
- name: Commit generated files
29+
run: |
30+
git config user.name "github-actions[bot]"
31+
git config user.email "github-actions[bot]@users.noreply.github.com"
32+
if [[ -n "$(git status --porcelain)" ]]; then
33+
git add .
34+
git commit -m "chore: update generated files after dependency update"
35+
git push
36+
else
37+
echo "No generated files changed, nothing to commit."
38+
fi

0 commit comments

Comments
 (0)