mirror of https://github.com/actions/cache.git
Use `cachePathList` to iterate over multiple cache paths
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
This commit is contained in:
parent
9a9c8d77fd
commit
197962b975
|
@ -56,6 +56,7 @@ async function run(): Promise<void> {
|
||||||
|
|
||||||
cachePathList = [cachePath, ...cachePathList];
|
cachePathList = [cachePath, ...cachePathList];
|
||||||
|
|
||||||
|
for (const cachePath of cachePathList) {
|
||||||
core.debug(`Cache Path: ${cachePath}`);
|
core.debug(`Cache Path: ${cachePath}`);
|
||||||
|
|
||||||
const archivePath = path.join(
|
const archivePath = path.join(
|
||||||
|
@ -80,6 +81,7 @@ async function run(): Promise<void> {
|
||||||
|
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
await cacheHttpClient.saveCache(cacheId, archivePath);
|
await cacheHttpClient.saveCache(cacheId, archivePath);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning(error.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue