Skip to content

Could not find a cache. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
te9no opened this issue Apr 21, 2025 · 2 comments
Closed

Could not find a cache. #2

te9no opened this issue Apr 21, 2025 · 2 comments

Comments

@te9no
Copy link

te9no commented Apr 21, 2025

Hello,
I have been using a Nix-based build with zmk-action.
It seems that when running the build via GitHub Actions, the cache is no longer available.

Set up West and Zephyr SDK
Run urob/zmk-actions/setup-sdk@main
Run # Manually default to /home/runner/work/_actions/urob/zmk-actions/main/setup-sdk. This is
Run # Manually compute hash because hashFiles doesn't work outside the workspace
Run nixbuild/nix-quick-install-action@v29
Run /home/runner/work/_actions/nixbuild/nix-quick-install-action/v29/nix-quick-install.sh
Fetching Nix archives from https://github.com/nixbuild/nix-quick-install-action/releases/download/v29/nix-2.24.9-x86_64-linux.tar.zstd
Installing nix-2.24.9
Building /nix/store/39qrdkz6q18hj8vj2rsqmw2kmldbjczj-user-environment.drv...

Run nix-community/cache-nix-action@v5
Searching for a cache with the key "nix-Linux-f26c2b2f2b3534949661adac8e38db8e96112dea64f6ddc33911a48f895512d3".
Warning: Failed to restore: Cache service responded with 422
Could not find a cache.

Searching for a cache using the "restore-prefixes-first-match":
["nix-Linux-"]
Warning: Failed to restore: Cache service responded with 422
Could not find a cache.

Referring to the details in the following page, I modified setup-sdk/action.yml, and caching is now enabled:
actions/setup-node#1275

Before modification:
uses: nix-community/cache-nix-action@v5
After modification:
uses: nix-community/cache-nix-action@v6

I would appreciate it if you could check this when you have time.
Thank you!

@te9no
Copy link
Author

te9no commented Apr 21, 2025

This issue has been resolved by this pull request.
Thank you!
#3

@te9no te9no closed this as completed Apr 21, 2025
@urob
Copy link
Owner

urob commented Apr 22, 2025

Thanks for raising the issue, there previously was an issue with my dependabot config. (Apparently, setting directory to / means .github/workflows and not everything in the repo.)

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

No branches or pull requests

2 participants