Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/rebuild-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

Expand All @@ -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:
Expand Down
Loading