Something went wrong. Try again.
Barazo default frontend barazo.forum
Something went wrong. Try again.
1.8 kB · 55 lines
YAML
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556name: Fix Lockfile
# Dependabot doesn't handle pnpm catalogs correctly -- it resolves# catalog: specifiers to concrete versions in the lockfile, causing# a mismatch that fails `pnpm install --frozen-lockfile` in CI.# This workflow regenerates the lockfile on Dependabot PRs.## Uses pull_request_target so the workflow has access to repo secrets# (Dependabot PRs don't get secrets with plain pull_request).# Safe because: only runs for dependabot[bot], only executes pnpm install# (no PR-supplied scripts), and only commits pnpm-lock.yaml.
on: pull_request_target: paths: - 'package.json' - 'pnpm-lock.yaml' - 'pnpm-workspace.yaml'
permissions: contents: write
jobs: fix-lockfile: name: Regenerate lockfile if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest timeout-minutes: 5
steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.pull_request.head.ref }} token: ${{ secrets.DEPLOY_PAT }}
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 24
- name: Regenerate lockfile run: pnpm install --no-frozen-lockfile
- name: Commit updated lockfile run: | if git diff --quiet pnpm-lock.yaml; then echo "Lockfile is already in sync." exit 0 fi git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add pnpm-lock.yaml git commit -m "fix(deps): regenerate lockfile for pnpm catalog compatibility" git push