From 03305bd95a00ba152fb4f83e81cbd7ed0baf79c6 Mon Sep 17 00:00:00 2001 From: MK Date: Thu, 6 Aug 2026 14:54:00 +0800 Subject: [PATCH] ci: re-run bundle rebuild when Renovate pushes to a labeled PR The rebuild-bundle workflow only fired on the labeled event, so when the one rebuild attempt failed or Renovate rebased the PR afterwards, dist/ stayed stale and the "Verify dist is up to date" check kept failing (seen on #119). Trigger on synchronize as well, gated on the label being present. The run triggered by our own dist/ push finds no diff and exits without pushing, so it cannot loop. --- .github/workflows/rebuild-bundle.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rebuild-bundle.yml b/.github/workflows/rebuild-bundle.yml index 168d87e..50ada34 100644 --- a/.github/workflows/rebuild-bundle.yml +++ b/.github/workflows/rebuild-bundle.yml @@ -3,10 +3,13 @@ name: Rebuild action bundle # The `needs-bundle-rebuild` label (Renovate adds it for bumps to deps compiled # into dist/index.mjs, or to the vite-plus bundler) triggers a rebuild of the # bundle and a push of the refreshed dist/, so the "Verify dist is up to date" -# check passes without a manual `vp run build`. +# check passes without a manual `vp run build`. `synchronize` re-runs the +# rebuild when Renovate rebases or pushes to a labeled PR, so a failed or stale +# rebuild gets retried; the run triggered by our own dist/ push finds no diff +# and exits without pushing, so it cannot loop. on: pull_request: - types: [labeled] + types: [labeled, synchronize] permissions: {} @@ -17,10 +20,11 @@ concurrency: jobs: rebuild: name: rebuild bundle - # Only for our label, and only same-repo branches we can push back to + # Only for labeled PRs (on the `labeled` event the just-added label is + # already in the array), and only same-repo branches we can push back to # (Renovate PRs are same-repo; fork PRs can't be pushed to). if: >- - github.event.label.name == 'needs-bundle-rebuild' && + contains(github.event.pull_request.labels.*.name, 'needs-bundle-rebuild') && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest permissions: