Repository navigation
Conversation
GitHub Actions auto-wraps every workflow artifact in a .zip, which Raspberry Pi Imager and balenaEtcher refuse to handle (they expect raw .img / .img.xz). Testers had to manually unzip the wrapper before flashing — clunky enough that it bit us during the first real-hardware test. Two coordinated workflow changes: 1. rpi-image-build.yml gets a final step that, on pull_request from the same repo, attaches the .img.xz to a draft pre-release tagged `pr-<N>-image-preview`. The asset is downloadable directly (no zip wrapper), draft so it stays out of the public Releases page, and upserted on each push so the PR has at most one preview at a time. Forks skipped — their GITHUB_TOKEN doesn't have contents:write. 2. rpi-preview-cleanup.yml fires on PR close (merged or rejected) and deletes the matching tag + draft release. Best-effort — PRs that never produced a preview (no image-path changes) simply 404 and that's fine. Production tagged releases continue to flow through release.yml unchanged. This is purely for review-cycle testing. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7edc493db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if: | | ||
| github.event_name == 'pull_request' && | ||
| github.event.pull_request.head.repo.full_name == github.repository |
There was a problem hiding this comment.
Skip preview upload if the PR has already closed
This step can recreate preview releases for closed PRs because the image build may run for a long time and finish after the PR is closed. The cleanup workflow only runs once on the pull_request.closed event, but this condition only checks event_name and same-repo origin, so an in-flight run triggered earlier will still publish pr-<N>-image-preview after cleanup has deleted it, leaving orphan draft releases/tags. A runtime check of the PR's current state (via API) before calling action-gh-release would prevent that.
Useful? React with 👍 / 👎.
Move the pin to srcfl/device-drivers@28c771fd (#279). zaptec_cloud 0.3.0 uses host.set_command_timeout_s and driver_release from this PR. The pin also carries the easee_cloud fixes merged since e7b94b11 (#183, #227, #194, #236, #200), whose Core side (#2050, #2062) is already on master. Tell the stopped instance's default apart from a replacement's startup default in TestOtherStopsKeepTheSafeDefault (review finding). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…val (#2079) * fix(drivers): give slow cloud drivers time, hand devices back on removal A Zaptec Cloud command that took longer than 5 s failed, and the safe default then paused the charger at 0 A. A driver can now ask for up to 30 s per call with host.set_command_timeout_s; the control tick still waits only its short deadline and the call finishes in the driver's queue. Removing or disabling a driver calls its optional driver_release instead of driver_default_mode, so a charger goes back to the owner's own current rather than staying at FTW's 0 A. Restarts, shutdown and stale readings keep the safe default. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(drivers): bundle zaptec_cloud 0.3.0 and easee_cloud 1.5.0 Move the pin to srcfl/device-drivers@28c771fd (#279). zaptec_cloud 0.3.0 uses host.set_command_timeout_s and driver_release from this PR. The pin also carries the easee_cloud fixes merged since e7b94b11 (#183, #227, #194, #236, #200), whose Core side (#2050, #2062) is already on master. Tell the stopped instance's default apart from a replacement's startup default in TestOtherStopsKeepTheSafeDefault (review finding). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Why
GitHub Actions auto-wraps every workflow artifact in a `.zip`, which Raspberry Pi Imager and balenaEtcher refuse to handle (they expect raw `.img` / `.img.xz`). Testers had to manually unzip the wrapper before flashing — clunky enough that it bit us during the first real-hardware test of #186.
Stacked on #193. Final piece in the rpi-image PR chain.
What
Two coordinated workflow changes:
`rpi-image-build.yml` gains a release-attach step. On `pull_request` from the same repo, it attaches the built `.img.xz` to a draft pre-release tagged `pr--image-preview`. Asset is downloadable directly (no zip wrapper), draft so it stays out of the public Releases page, and upserted on each push. Forks skipped (their `GITHUB_TOKEN` doesn't have `contents: write`).
New `rpi-preview-cleanup.yml` fires on PR close (merged or rejected) and deletes the matching tag + draft release. Best-effort — PRs that never produced a preview (no image-path changes) simply 404, that's fine.
Production tagged releases continue through `release.yml` unchanged.
Test plan
🤖 Generated with Claude Code