Skip to content

ci: auto-rebuild action bundle on Renovate dependency bumps#103

Merged
fengmk2 merged 2 commits into
mainfrom
feat/rebuild-bundle-workflow
Jul 1, 2026
Merged

ci: auto-rebuild action bundle on Renovate dependency bumps#103
fengmk2 merged 2 commits into
mainfrom
feat/rebuild-bundle-workflow

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Renovate bumps to bundled deps (`@actions/*`, `yaml`, `zod`) or to the `vite-plus` bundler change `dist/index.mjs`, which fails the "Verify dist is up to date" check until someone manually runs `vp run build` and commits.

This adapts the label-triggered rebuild approach from voidzero-dev/pkg-pr-registry-bridge#47:

  • New `.github/workflows/rebuild-bundle.yml`: on the `needs-bundle-rebuild` label (same-repo PRs only), rebuild `dist/` and push it back to the PR branch. Uses a GitHub App token so the push re-triggers the PR's required checks.
  • `.github/renovate.json`: attach the `needs-bundle-rebuild` label to runtime `dependencies` and to `vite-plus`, the bumps that can change the bundle.

Relies on the org secrets `APP_ID` / `APP_PRIVATE_KEY` (same App/secrets as the reference repo).

Renovate bumps to bundled deps (@actions/*, yaml, zod) or the vite-plus
bundler change dist/index.mjs, which fails the 'Verify dist is up to
date' check until someone manually runs 'vp run build' and commits.

Add a label-triggered workflow that rebuilds dist/ and pushes it back to
the PR branch, and configure Renovate to attach the needs-bundle-rebuild
label to those bumps. A GitHub App token is used for the push so the
PR's required checks re-run.
@fengmk2 fengmk2 added the needs-bundle-rebuild Rebuild dist/ bundle and push to the PR (Renovate bumps to bundled deps) label Jul 1, 2026
Drop the hardcoded pnpm version (read from package.json packageManager)
and use .node-version instead of a pinned node-version, matching the
existing build job and avoiding version drift.
@fengmk2 fengmk2 marked this pull request as ready for review July 1, 2026 09:00
Copilot AI review requested due to automatic review settings July 1, 2026 09:00
@fengmk2 fengmk2 added needs-bundle-rebuild Rebuild dist/ bundle and push to the PR (Renovate bumps to bundled deps) and removed needs-bundle-rebuild Rebuild dist/ bundle and push to the PR (Renovate bumps to bundled deps) labels Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automation to keep the GitHub Action’s bundled output (dist/) in sync when Renovate updates dependencies that affect the bundle, by labeling such PRs and running an auto-rebuild workflow that commits refreshed dist/ back to the PR branch.

Changes:

  • Add a new rebuild-bundle workflow triggered by the needs-bundle-rebuild PR label to rebuild and push updated dist/.
  • Update Renovate configuration to automatically apply needs-bundle-rebuild to runtime dependency bumps and vite-plus bumps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/rebuild-bundle.yml Adds a label-triggered workflow intended to rebuild dist/ and push the result back to the PR branch.
.github/renovate.json Adds package rules so Renovate applies needs-bundle-rebuild to dependency updates that can change dist/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +51 to +55
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Rebuild the action bundle
run: pnpm build
Comment on lines +66 to +67
git commit -m "chore: rebuild action bundle for dependency update"
git push
@fengmk2 fengmk2 merged commit a5a1bc2 into main Jul 1, 2026
36 checks passed
@fengmk2 fengmk2 deleted the feat/rebuild-bundle-workflow branch July 1, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-bundle-rebuild Rebuild dist/ bundle and push to the PR (Renovate bumps to bundled deps)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants