1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-20 03:46:17 +02:00

Use cachePathList to iterate over multiple cache paths

Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
This commit is contained in:
Kipras Melnikovas 2020-02-07 01:26:30 +02:00
parent 9a9c8d77fd
commit 197962b975
No known key found for this signature in database
GPG key ID: AA505BC1C6D8AD90

View file

@ -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);
} }