Fix scheduled builds failing on missing repository field #27

Merged
TheDarkWizard merged 4 commits from fix-scheduled-build into main 2026-07-01 10:46:00 +00:00

Forgejo's scheduled-event payload omits the repository field, but the blue-build CLI deserializes GITHUB_EVENT_PATH into a struct that requires it (get_repo_url/get_registry), so nightly builds fail with missing field \repository``. GitHub's own schedule payload includes it, which is why manual workflow_dispatch runs are unaffected.

On scheduled runs, rebuild a valid payload from the github context and repoint the CLI at it via $GITHUB_ENV. default_branch is set to ref_name (main on a schedule) so on_default_branch() stays true and dated release tags are still produced.

Also adds a throwaway test-event-override workflow (workflow_dispatch) to verify the one uncertain part: that the GITHUB_EVENT_PATH override actually propagates via $GITHUB_ENV in the Forgejo runner. Run it on this branch, confirm the assert step passes, then remove the file before merge.

Forgejo's scheduled-event payload omits the `repository` field, but the blue-build CLI deserializes `GITHUB_EVENT_PATH` into a struct that requires it (`get_repo_url`/`get_registry`), so nightly builds fail with `missing field \`repository\``. GitHub's own schedule payload includes it, which is why manual workflow_dispatch runs are unaffected. On scheduled runs, rebuild a valid payload from the `github` context and repoint the CLI at it via $GITHUB_ENV. `default_branch` is set to `ref_name` (main on a schedule) so `on_default_branch()` stays true and dated release tags are still produced. Also adds a throwaway `test-event-override` workflow (workflow_dispatch) to verify the one uncertain part: that the `GITHUB_EVENT_PATH` override actually propagates via $GITHUB_ENV in the Forgejo runner. Run it on this branch, confirm the assert step passes, then remove the file before merge.
Fix scheduled builds failing on missing repository field
Some checks failed
PR Rebase Hint / Post rebase command (pull_request) Successful in 4s
bluebuild / Release (pull_request) Has been cancelled
bluebuild / Generate Release (pull_request) Has been cancelled
bluebuild / Build GNOME NVIDIA (pull_request) Has been cancelled
bluebuild / Build GNOME (pull_request) Has been cancelled
761804a3bd
Forgejo's scheduled-event payload omits the repository field, but the
blue-build CLI deserializes GITHUB_EVENT_PATH into a struct that requires
it (get_repo_url/get_registry), so nightly builds fail with
"missing field `repository`". GitHub's own schedule payload includes it,
which is why manual workflow_dispatch runs are unaffected.

Rebuild a valid payload from the github context on scheduled runs and
repoint the CLI at it. default_branch is set to ref_name (main on a
schedule) so on_default_branch() stays true and dated release tags are
still produced.

Add a throwaway test-event-override workflow to verify the one uncertain
part, that the GITHUB_EVENT_PATH override propagates via $GITHUB_ENV in
the Forgejo runner. Remove it once verified.

🧪 Test this PR on a real install

Once the build checks on this PR pass, a signed test image is published for each edition. Pick the one matching your hardware and, from an existing Monolith install (which already has the signing policy), rebase onto it:

gnome

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome:pr-27-44
systemctl reboot

gnome-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome-nvidia:pr-27-44
systemctl reboot

The tags are rebuilt on every new commit here, so rpm-ostree upgrade pulls the latest build. When you're done testing, return to your edition's released image (:latest).

The test tags stop updating once this PR is merged or closed.

### 🧪 Test this PR on a real install **Once the build checks on this PR pass**, a signed test image is published for each edition. Pick the one matching your hardware and, from an existing Monolith install (which already has the signing policy), rebase onto it: **`gnome`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome:pr-27-44 systemctl reboot ``` **`gnome-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome-nvidia:pr-27-44 systemctl reboot ``` The tags are rebuilt on every new commit here, so `rpm-ostree upgrade` pulls the latest build. When you're done testing, return to your edition's released image (`:latest`). _The test tags stop updating once this PR is merged or closed._
Run event-override probe on pull_request
Some checks failed
test-event-override / probe (pull_request) Failing after 1s
bluebuild / Release (pull_request) Has been cancelled
bluebuild / Generate Release (pull_request) Has been cancelled
bluebuild / Build GNOME (pull_request) Has been cancelled
bluebuild / Build GNOME NVIDIA (pull_request) Has been cancelled
176b13e69b
Forgejo only lists workflow_dispatch workflows that live on the default
branch, so the probe couldn't be dispatched from a feature branch. Run it
on pull_request instead so it executes automatically on this PR.
Overwrite event file in place instead of repointing it
Some checks failed
test-event-override / probe (pull_request) Successful in 3s
bluebuild / Release (pull_request) Has been cancelled
bluebuild / Generate Release (pull_request) Has been cancelled
bluebuild / Build GNOME (pull_request) Has been cancelled
bluebuild / Build GNOME NVIDIA (pull_request) Has been cancelled
bae762d036
The probe showed this runner (act) ignores GITHUB_* overrides written to
$GITHUB_ENV, so repointing GITHUB_EVENT_PATH did not take effect. Overwrite
the file GITHUB_EVENT_PATH already points at instead, and update the probe
to prove the write is visible to a later step (via a sentinel value).
Remove event-override probe now that the fix is verified
Some checks failed
bluebuild / Release (pull_request) Has been cancelled
bluebuild / Generate Release (pull_request) Has been cancelled
bluebuild / Build GNOME NVIDIA (pull_request) Has been cancelled
bluebuild / Build GNOME (pull_request) Has been cancelled
6237f7f05c
Sign in to join this conversation.
No description provided.