Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/dependabot-rebuild-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Rebuild dist for Dependabot

on:
pull_request_target:
branches:
- main
paths:
- 'package.json'
- 'package-lock.json'

permissions:
contents: write

jobs:
rebuild-dist:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set Node.js 16.x
uses: actions/setup-node@v6.4.0
with:
node-version: 16.x

- name: Install dependencies
run: npm install

- name: Rebuild dist
run: |
npm run build
npm run package

- name: Commit rebuilt dist
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dist/
if git diff --staged --quiet; then
echo "No dist changes to commit"
else
git commit -m "chore: rebuild dist for dependabot dependency updates"
git push
fi
Loading