Repository navigation
Rebuild dist/ automatically on Dependabot PRs - #46
Merged
Merged
Conversation
Dependabot bumps of bundled dependencies (e.g. undici) always failed the "Check dist/" job until someone rebuilt dist/ by hand. Build dist/ in a read-only job with install scripts disabled, then push it back to the PR branch from a separate job that runs no npm code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
silv-io
force-pushed
the
dependabot-rebuild-dist
branch
from
October 29, 2026 14:34
77508cb to
41e630f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependabot updates
package-lock.jsonbut never rebuildsdist/, so any bump of a bundled dependency (undici in #39 and #43) fails Check dist/ until someone rebuilds it by hand.This adds a workflow that runs only on Dependabot PRs:
npm ci --ignore-scriptsandnpm run bundlewith a read-only token, then uploadsdist/as an artifact.Rebuild dist/commit to the PR branch if anything changed. It's the only job withcontents: write, and it runs no npm code.Pushes made with
GITHUB_TOKENdon't start new workflow runs, so after the bot commit the PR head shows no checks. CI runs again onmainafter merge. If we want checks on that commit as well, the push needs a GitHub App token stored as a Dependabot secret.npm ci --ignore-scriptsbuilds correctly: I rebuilt #43 with it, and the result is byte-identical to thedist/that CI expected.🤖 Generated with Claude Code