mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-28 23:19:16 +01:00
examples: Reuse cargo registry cache across OSes
The registry filesystem format and the git repositories work across platforms, no need to maintain runner-specific caches for these.
This commit is contained in:
parent
984ce638f0
commit
5e5fbe724b
1 changed files with 9 additions and 4 deletions
11
examples.md
11
examples.md
|
@ -428,13 +428,18 @@ When dependencies are installed later in the workflow, we must specify the same
|
||||||
## Rust - Cargo
|
## Rust - Cargo
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v2
|
- name: Cache cargo dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
target
|
key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
- name: Cache cargo build
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Scala - SBT
|
## Scala - SBT
|
||||||
|
|
Loading…
Reference in a new issue