fix(ci/nix): export USER before Nix steps so cachix runs in act_runner #2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/nix-cachix-user-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Nix / nix (ubuntu-latest)was the remaining red after PR #1 fixed Tests/setup-uv. Diagnosis:cachix-action(called from.github/actions/nix-setup/action.yml) shells out tonix-env -iA cachixandcachix use hermes-agent. Both requireHOME + USERset on the caller (Nix usesUSERto scope per-user profile directories). The act_runner job container propagatesHOME=/tmp/...but notUSER, so cachix exits 1 on a fresh container.The cachix step has
continue-on-error: true, but act_runner appears to bubble the failure to the job result anyway — possibly an act_runner deviation from github-actions semantics, possibly a step-exit-before-catch race. Either way the proper fix is to make cachix not fail in the first place.What changed
.github/actions/nix-setup/action.yml— adds a one-time pre-step that exportsUSERbefore any Nix invocation:id -unresolves to whatever user the container runs as (root, on our act_runners). Falls back torootifid -unis unavailable. Theifguard avoids overriding USER when it IS set (e.g., on a properly-configured GitHub.com runner) so this PR doesn't regress github-hosted CI.Test plan
Nix / nix (ubuntu-latest)against this branch's HEADcachix use hermes-agentsuccessfullyTracked separately from PR #1
PR #1 fixes Tests/setup-uv (a different rate-limit-on-api.github.com pattern). Same overall theme — act_runner compat with GitHub-style actions — but distinct concerns. One PR per concern.
Class
CI / runner-environment compatibility. Not a regression of any code change in this repo; the failure mode is post-2026-05-06-org-suspension fallout (act_runner became the canonical runner once GitHub-hosted actions stopped being viable).
Generated with Claude Code.
Checkout
From your project repository, check out a new branch and test the changes.