Keep sync PRs building across bot pushes
Three things kept the upstream sync PR (#589) from ever finishing a build: Scoped dispatches wiped the shared PR. A workflow_dispatch with `packages` regenerates only those packages from master, and pushing that to auto/sync-upstream replaced 38 pending updates with one. Scoped runs now push to their own auto/sync-{upstream,rebuilds}-<packages> branch and PR; scheduled runs keep the shared branch. build-approved stopped working after the first bot push. A GITHUB_TOKEN push creates pull_request runs held for approval but no pull_request_target run, so approve-pr.yml never saw it: its last run on the branch was the label itself (2026-09-25T19:26), and each of the next four syncs sat at action_required. The sync workflows now release the held runs for the commit they just pushed, from a separate job holding actions: write, and only for their own bot-authored, same-repo PR while build-approved is on it. Each approved push cancelled the in-flight build. Approving the 21:43 sync's build cancelled the label-triggered one still queued on strata and schist-bin. On auto/sync-* branches a new build now waits for the running one instead, then reuses its artifacts. The approval script no longer waits for a lone approved build to start before releasing tests, which a queued build would have turned into a timeout.
This commit is contained in:
1 parent
6df9953d8f
commit
4aca3bdbc7
8 files changed
+363
-9
No files matched your search
@@ -883,6 +883,22 @@ The repository includes GitHub workflows and systemd services for automated rele
|
||||
1. **sync-upstream.yml** (Every 6 hours): Watches direct upstream feeds and updates owned recipes. Successful package updates reach a PR even if another feed fails; failed recipes stay untouched and the workflow remains red.
|
||||
2. **sync-rebuilds.yml** (Every 6 hours): Bumps pkgrel for packages whose `rebuild_on` dependencies have moved in the official repositories and opens a PR.
|
||||
|
||||
Scheduled runs regenerate one shared PR (`auto/sync-upstream`, `auto/sync-rebuilds`)
|
||||
from master. A manual run with the `packages` input only regenerates those
|
||||
packages, so it opens its own PR on `auto/sync-upstream-<packages>` (or
|
||||
`auto/sync-rebuilds-<packages>`) rather than replacing the shared PR's other
|
||||
pending updates. The next scheduled run still picks the same update up in the
|
||||
shared PR if it has not merged by then; identical package trees reuse the same
|
||||
build artifacts.
|
||||
|
||||
Sync PRs are pushed with `GITHUB_TOKEN`, so GitHub holds their build and test
|
||||
runs for approval on every push and starts no `pull_request_target` workflow
|
||||
for them. Once **`build-approved`** is on a sync PR, the sync workflow's own
|
||||
`approve` job releases the held runs for each commit it pushes. A push to an
|
||||
`auto/sync-*` branch does not cancel the PR's in-flight build: the new build
|
||||
waits for it and then reuses its artifacts, so a long aarch64 build is not
|
||||
restarted by every sync.
|
||||
|
||||
To approve builds for an unvouched contributor's PR, apply **`build-approved`**.
|
||||
Until approval, the PR shows **Awaiting build approval** and its required
|
||||
`result` check stays pending, keeping the PR blocked from merging without
|
||||
|
||||
Reference in new issue
Block a user