mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 22:00:34 +00:00
docs: document cargo cache setup
This commit is contained in:
parent
8d3b0ba20a
commit
5780a89cf2
1 changed files with 22 additions and 0 deletions
22
README.md
22
README.md
|
|
@ -94,6 +94,28 @@ You can also extend the default cache key:
|
|||
|
||||
This gives you full control over cache invalidation based on the specific aspects that matter to your workflow.
|
||||
|
||||
### Rust and Cargo Caches
|
||||
|
||||
This action caches mise's own data, but it is not a replacement for a Cargo-aware
|
||||
cache. For Rust projects, cache Cargo dependencies, build artifacts, and
|
||||
Cargo-installed tools explicitly.
|
||||
|
||||
The usual setup is to run `Swatinem/rust-cache` after `mise-action`, so the cache
|
||||
key can include the Rust/Cargo environment and Cargo lockfiles:
|
||||
|
||||
```yaml
|
||||
- uses: jdx/mise-action@v4
|
||||
with:
|
||||
install: true
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
```
|
||||
|
||||
`Swatinem/rust-cache` caches `~/.cargo` and `target` by default, including
|
||||
`~/.cargo/bin` for tools installed during the workflow. If your workflow uses a
|
||||
custom `CARGO_HOME`, or installs Cargo tools somewhere else, add that directory
|
||||
to your cache configuration manually.
|
||||
|
||||
## GitHub API Rate Limits
|
||||
|
||||
When installing tools hosted on GitHub (like `gh`, `node`, `bun`, etc.), mise needs to make API calls to GitHub's releases API. Without authentication, these calls are subject to GitHub's rate limit of 60 requests per hour, which can cause installation failures.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue