mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-29 21:40:01 +00:00
Add autoclean.
This commit is contained in:
parent
8cbd5dda6b
commit
293503e099
2 changed files with 9 additions and 0 deletions
5
post.ts
5
post.ts
|
@ -1,5 +1,6 @@
|
|||
import * as cache from '@actions/cache';
|
||||
import * as core from '@actions/core';
|
||||
import * as exec from '@actions/exec';
|
||||
import { getPathsToCache, getPrimaryCacheKey } from './helpers';
|
||||
|
||||
async function saveCache() {
|
||||
|
@ -17,6 +18,10 @@ async function saveCache() {
|
|||
return;
|
||||
}
|
||||
|
||||
core.info('Cleaning cache before saving');
|
||||
|
||||
await exec.exec('cargo', ['cache', '--autoclean']);
|
||||
|
||||
core.info(`Saving cache with key ${primaryKey}`);
|
||||
|
||||
await cache.saveCache(getPathsToCache(), primaryKey, {}, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue