mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-16 16:01:22 +02:00
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
1 changed files with 23 additions and 21 deletions
|
@ -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…
Add table
Reference in a new issue