Skip to content

build(deps-dev): bump the npm-development group across 1 directory with 13 updates #109

build(deps-dev): bump the npm-development group across 1 directory with 13 updates

build(deps-dev): bump the npm-development group across 1 directory with 13 updates #109

name: Dependabot Auto-Merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v3
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Checkout PR
if: steps.metadata.outputs.dependency-type == 'direct:production'
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup pnpm
if: steps.metadata.outputs.dependency-type == 'direct:production'
uses: pnpm/action-setup@v6
- name: Setup Node.js
if: steps.metadata.outputs.dependency-type == 'direct:production'
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
if: steps.metadata.outputs.dependency-type == 'direct:production'
run: pnpm install --frozen-lockfile
- name: Rebuild dist/
if: steps.metadata.outputs.dependency-type == 'direct:production'
run: pnpm bundle
- name: Check for dist/ changes
if: steps.metadata.outputs.dependency-type == 'direct:production'
id: dist-check
run: |
if git diff --quiet dist/; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Commit updated dist/
if: steps.metadata.outputs.dependency-type == 'direct:production' && steps.dist-check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add dist/
git commit -m "build: regenerate dist/ with updated dependencies"
git push
- name: Enable auto-merge for patch updates
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}