mirror of
https://github.com/Swatinem/rust-cache
synced 2026-06-08 09:50:48 +00:00
also cache cargo install metadata
This commit is contained in:
parent
720f7e45cc
commit
008623fb83
6 changed files with 56 additions and 49 deletions
|
|
@ -38,19 +38,12 @@ async function run() {
|
|||
// Pass a copy of cachePaths to avoid mutating the original array as reported by:
|
||||
// https://github.com/actions/toolkit/pull/1378
|
||||
// TODO: remove this once the underlying bug is fixed.
|
||||
const restoreKey = await cacheProvider.cache.restoreCache(
|
||||
config.cachePaths.slice(),
|
||||
key,
|
||||
[config.restoreKey],
|
||||
{ lookupOnly }
|
||||
);
|
||||
const restoreKey = await cacheProvider.cache.restoreCache(config.cachePaths.slice(), key, [config.restoreKey], {
|
||||
lookupOnly,
|
||||
});
|
||||
if (restoreKey) {
|
||||
const match = restoreKey === key;
|
||||
core.info(
|
||||
`${
|
||||
lookupOnly ? "Found" : "Restored from"
|
||||
} cache key "${restoreKey}" full match: ${match}.`
|
||||
);
|
||||
core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
|
||||
if (!match) {
|
||||
// pre-clean the target directory on cache mismatch
|
||||
for (const workspace of config.workspaces) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue