Skip to content
Merged
Show file tree
Hide file tree
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/fix-dependabot-lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Fix Dependabot Lockfile

on:
pull_request:
branches: [main]

permissions:
contents: write

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
fix-lockfile:
name: Fix pnpm lockfile
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm

- name: Regenerate lockfile
run: pnpm install --no-frozen-lockfile

- name: Commit lockfile if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pnpm-lock.yaml
if git diff --staged --quiet; then
echo "Lockfile already up to date."
else
git commit -m "chore: fix pnpm lockfile catalog specifiers"
git push
fi
Loading