ci: pass placeholder token to cache-nix-action

cache-nix-action@v7 reads its token input as required in both restore
and save; its github.token default is empty under ngit-ci (no
GITHUB_TOKEN is injected), so both phases threw "Input required and not
supplied: token" and, hidden by continue-on-error, the Nix store cache
never restored or saved. Any non-empty value satisfies the check and is
never transmitted while purge (default off) stays disabled.

Validation: matches the fix applied to ngit-ci's own workflows and its
documented snippet; the next push-triggered run should show the
restore/save steps succeeding instead of failing fast.
This commit is contained in:
DanConwayDev
2026-08-19 18:26:10 +00:00
parent 909706cd62
commit 7f7530664b
+3
View File
@@ -28,6 +28,9 @@ jobs:
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
# cache-nix-action requires a token even with purge disabled;
# github.token is empty under ngit-ci, so any non-empty value works.
token: unused
- name: Restore Rust build cache
continue-on-error: true
uses: actions/cache@v4