Skip to content

Rebuild dist/ automatically on Dependabot PRs - #46

Merged
silv-io merged 1 commit into
mainfrom
dependabot-rebuild-dist
Oct 29, 2026
Merged

silv-io merged 1 commit into
mainfrom
dependabot-rebuild-dist

Conversation

@silv-io

@silv-io silv-io commented Oct 29, 2026

Copy link
Copy Markdown
Member

Dependabot updates package-lock.json but never rebuilds dist/, 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:

  • Build dist/ runs npm ci --ignore-scripts and npm run bundle with a read-only token, then uploads dist/ as an artifact.
  • Commit dist/ downloads the artifact and pushes a Rebuild dist/ commit to the PR branch if anything changed. It's the only job with contents: write, and it runs no npm code.

Pushes made with GITHUB_TOKEN don't start new workflow runs, so after the bot commit the PR head shows no checks. CI runs again on main after 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-scripts builds correctly: I rebuilt #43 with it, and the result is byte-identical to the dist/ that CI expected.

🤖 Generated with Claude Code

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
silv-io force-pushed the dependabot-rebuild-dist branch from 77508cb to 41e630f Compare October 29, 2026 14:34
@silv-io
silv-io merged commit eea8169 into main Oct 29, 2026
24 checks passed
@silv-io
silv-io deleted the dependabot-rebuild-dist branch October 29, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant