From e3b08f02353629ba4af2be089dc01ccabe562c3d Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Tue, 28 Jul 2026 11:23:55 +0100 Subject: [PATCH] Provide the attic client when not installing Nix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit attic-action resolves attic via PATH, which relies on a Nix installer action having run in the same job. With install-nix: false, build the client and put its store path on PATH — unless the runner already provides one. Co-Authored-By: Claude Fable 5 --- action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/action.yml b/action.yml index f0180fc..943bf4a 100644 --- a/action.yml +++ b/action.yml @@ -63,6 +63,16 @@ runs: fallback = true ${{ inputs.extra-nix-config }} + # attic-action resolves `attic` via PATH, which only works when a Nix + # installer action ran in the same job. With preinstalled Nix (self-hosted + # runners) provide the client at its store path. + - name: Provide attic client + if: inputs.install-nix != 'true' + shell: bash + run: | + command -v attic >/dev/null && exit 0 + echo "$(nix build --no-link --print-out-paths 'github:NixOS/nixpkgs/nixpkgs-unstable#attic-client')/bin" >> "$GITHUB_PATH" + - name: Select Attic cache and token id: select shell: bash