fix(release): install Nix profile tools after checkout #288
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/auto_review!288
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/release-publish-checkout-before-flake-install"
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?
Scope of this PR
Fixes the ordering of the
release-publishForgejo workflow so the Nixprofile tools are installed only after the repository is checked out.
What changed
.forgejo/workflows/release-publish.yml: move the Install or reuse Nixstep (which runs
nix profile install --inputs-from . nixpkgs#tea nixpkgs#coreutils nixpkgs#gawk nixpkgs#gnused) so it runs after bothconditional checkout steps (
pushandworkflow_dispatch) rather thanbefore them.
crates/ar-gateway/tests/ci_workflow_contract.rs: add therelease_publish_installs_profile_tools_after_checkoutcontract test thatasserts both checkout steps precede the
--inputs-from .profile install.Why
nix profile install --inputs-from .resolves its inputs from the flake inthe working tree. Running it before checkout means there is no flake to
resolve against, so on a cold runner the profile-tools install could fail or
resolve against the wrong inputs. Installing after checkout guarantees the
flake is present first; the contract test guards the ordering against
regression.
Verification
cargo nextest run -p ar-gateway release_publish— 4 passed.cargo fmt --checkandcargo clippy -p ar-gateway --tests— clean.full-verificationhook passed.🤖 Generated with Claude Code
The PR fixes the order of operations in the
release-publishworkflow by ensuring the Nix profile tools are installed after the repository is checked out. This change is verified by a new contract test, which guards against future regressions.LLM usage and cost
Estimated total USD: $0.014407 via https://api.openai.com and https://api.openai.com