Skip to content

ci: use logos-co/setup-nix-cache-action for Nix setup and caching - #83

Merged
dlipicar merged 1 commit into
masterfrom
ci/setup-nix-cache-action
Aug 19, 2026
Merged

ci: use logos-co/setup-nix-cache-action for Nix setup and caching#83
dlipicar merged 1 commit into
masterfrom
ci/setup-nix-cache-action

Conversation

@dlipicar

Copy link
Copy Markdown
Contributor

Converts this repo to logos-co/setup-nix-cache-action for Nix setup and caching, replacing the per-repo installer + cachix/cachix-action pair. The action installs Nix with the Logos Attic cache (cache.nix.logos.co) preconfigured and publishes what the job builds — master to the public cache, every other ref to ci.

Each converted job also gains

environment: ${{ github.ref == 'refs/heads/master' && 'public-cache' || '' }}

ATTIC_TOKEN_PUBLIC exists only inside that environment. Without the expression the secret resolves empty on master and publishing is silently skipped — the job still passes, so the omission would never surface as a failure.

Two deliberate choices

The action installs Nix on macOS too. Several repos here used DeterminateSystems/nix-installer-action on macOS runners because cachix/install-nix-action collides with the runner's pre-existing _nixbld users (eDSRecordAlreadyExists). That no longer reproduces: logos-delivery-module is already converted the plain way and its build-and-test (macos-latest) leg passes. Keeping the workaround would have meant a second installer plus a duplicated substituter/key block for a failure that two green runs say does not happen. If it recurs it fails loudly at install, which is recoverable — unlike the silent-skip above.

continue-on-error is not carried over. The old cachix step had it, so a failed cache push could not fail a job whose tests passed. The action exposes no equivalent, and adding one would also swallow genuine setup failures now that the same step installs Nix rather than only publishing at the end.

Verified: every touched workflow parses (yq), no cachix / installer residue remains, and every job using the action carries the environment expression.

🤖 Generated with Claude Code

Replaces the per-repo installer + cachix pair with the shared action, which
installs Nix with the Logos Attic cache (cache.nix.logos.co) preconfigured and
publishes what the job builds — master to the public cache, every other ref to
ci.

Each converted job also gains

    environment: ${{ github.ref == 'refs/heads/master' && 'public-cache' || '' }}

because ATTIC_TOKEN_PUBLIC only exists inside that environment. Without it the
secret resolves empty on master and publishing is silently skipped — the job
still passes, so the omission would not surface as a failure.

The action installs Nix on every runner, macOS included. Sibling repos used
DeterminateSystems' installer there because cachix/install-nix-action collided
with the runner's pre-existing _nixbld users (eDSRecordAlreadyExists); that no
longer reproduces — logos-delivery-module converted the plain way and its
macos-latest leg passes — so the second installer is not carried over.

One property is deliberately not carried over: the old cachix step ran with
`continue-on-error: true` so a failed cache push could not fail a job whose
tests passed. The action exposes no equivalent, and adding one would also
swallow genuine setup failures now that the same step installs Nix rather than
only publishing at the end.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dlipicar
dlipicar merged commit dc4635d into master Aug 19, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

📊 Tutorial execution report

Rendered tutorial alongside the commands actually run and their output (updated each run, commit fbed028):

Pages can take a minute to update after the run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant