-
Notifications
You must be signed in to change notification settings - Fork 14
ci: update dependencies with pnpm/update instead of Dependabot #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Update Dependencies | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 4 * * 1' # Mondays, 04:00 UTC | ||
| workflow_dispatch: {} | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| concurrency: | ||
| group: update-dependencies | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| update-dependencies: | ||
| # The branch push and the pull request both target this repository, so | ||
| # this must never run on a fork. | ||
| if: github.repository == 'pnpm/setup' | ||
| name: 'Update dependencies' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
|
|
||
| # This repository's own action, on the pnpm it ships. `install: false` | ||
| # because pnpm/update deletes the lockfile and node_modules before it | ||
| # resolves anything, so installing first would be thrown away. | ||
| - uses: ./ | ||
| with: | ||
| version: '^12.0.0' | ||
| install: false | ||
|
|
||
| - uses: pnpm/update@v0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The scheduled job invokes |
||
| with: | ||
| # `dist/index.js` is committed, and pr-check rebuilds it and fails on | ||
| # any difference. Every runtime dependency is inlined into that | ||
| # bundle, and esbuild itself decides how — so it has to be | ||
| # regenerated in the same commit as the bump, or the update pull | ||
| # request can never go green. This is the step Dependabot had no way | ||
| # to run. | ||
| post-update: pnpm run build | ||
| verify: | | ||
| pnpm exec tsc --noEmit | ||
| pnpm test | ||
| # No .changeset directory in this repository. | ||
| changesets: false | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments restate the adjacent repository guard, installation setting, build hook, and Changesets input. This duplicates the configuration in prose that must be maintained alongside it and can drift when the workflow changes; remove the narration and use focused tests where the behavior needs coverage.
Context Used: Comments and docs in code are suspicious. Is test ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!