ci: Add verify-nix pipeline #27
Loading…
Reference in a new issue
No description provided.
Delete branch "verify-nix-pipeline"
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?
Review Summary
This revision clears nearly all of the previous feedback: the trigger glob is widened to
**/*.nix(which does reach the real derivations under.nix/), commands use the repo's$${VAR}escaping, the step builds.#recurring-events-imageright away (no moredefault-package gap),nix path-info .#recurring-events-imageis flakeref-scoped,depends_onwithoptional: trueis fine on this instance's Woodpecker 3.16, and the redundantpushtrigger was dropped so the pipeline is PR/manual-only — its unique value. Theflake.lockbump tomy-nix-libv0.1.2 correctly syncs with theref = "v0.1.2"already inflake.nix.The blocker carried over from the prior round remains:
cachix authtoken $${CACHIX_AUTH_TOKEN}is the only unguarded cachix command, but Woodpecker does not expose secrets topull_requestevents by default. On a PR run the token is empty and this command can fail the step (or silently no-op the caching), while the guarded push means PR builds never populate the cache regardless. Recommend guarding cachix setup+push on token presence (if [ -n "${CACHIX_AUTH_TOKEN:-}" ]) or restricting auth/push to events where the secret is available.Worth tightening as well: the trailing
|| echo "⚠️ ... skipped"masks genuine push failures (registry down, revoked token) on manual runs, and withoutset -o pipefaila failingnix path-infopipes empty stdin intocachix push, which can exit 0 and swallow the real error. And because the repo mixes.yml/.yamlpipeline files,push.yaml/deploy.yamlstill only exclude.woodpecker/*.yml— a default-branch push touching only this new config (which its own trigger lists) will spuriously rebuild/push the image and bump the cluster environment.*🤖 Review by opencode (opencode/deepseek-v4-flash-free) — verdict: changes
Code review findings from opencode.
@ -0,0 +3,4 @@- event: pull_requestpath:include:- "*.nix"@ -0,0 +15,4 @@- ".woodpecker/verify-nix.yaml"depends_on:- name: verifyIt is 3.16
@ -0,0 +26,4 @@from_secret: cachix_auth_tokenCACHE_NAME: martialscommands:- cachix authtoken $CACHIX_AUTH_TOKENCode review findings from opencode.
Code review findings from opencode.
@ -0,0 +6,4 @@- "**/*.nix"- "flake.lock"- ".woodpecker/verify-nix.yaml"- event: push@ -0,0 +12,4 @@include:- "**/*.nix"- "flake.lock"- ".woodpecker/verify-nix.yaml"@ -0,0 +29,4 @@- cachix authtoken $${CACHIX_AUTH_TOKEN}- cachix use $${CACHE_NAME}- nix build .#recurring-events-image --print-build-logs --no-link- nix path-info .#recurring-events-image | cachix push $${CACHE_NAME} || echo "⚠️ Cachix push skipped, continuing..."Code review findings from opencode.
@ -0,0 +5,4 @@include:- "**/*.nix"- "flake.lock"- ".woodpecker/verify-nix.yaml"@ -0,0 +19,4 @@from_secret: cachix_auth_tokenCACHE_NAME: martialscommands:- cachix authtoken $${CACHIX_AUTH_TOKEN}It is exposed to pull requests
@ -0,0 +22,4 @@- cachix authtoken $${CACHIX_AUTH_TOKEN}- cachix use $${CACHE_NAME}- nix build .#recurring-events-image --print-build-logs --no-link- nix path-info .#recurring-events-image | cachix push $${CACHE_NAME} || echo "⚠️ Cachix push skipped, continuing..."1b5027b56f1aaf0946ed