Add hash of Cargo.lock to keys of caches

This commit is contained in:
rhysd 2019-10-31 14:52:56 +09:00
parent 9dd57f4d18
commit d6264c17f8

View file

@ -64,17 +64,17 @@ See [Examples](examples.md)
uses: actions/cache@preview uses: actions/cache@preview
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@preview uses: actions/cache@preview
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build - name: Cache cargo build
uses: actions/cache@preview uses: actions/cache@preview
with: with:
path: target path: target
key: ${{ runner.os }}-cargo-build-target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
``` ```
## Cache Limits ## Cache Limits