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

Create cachePathList @ save.ts

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

View file

@ -46,6 +46,16 @@ async function run(): Promise<void> {
const cachePath = utils.resolvePath( const cachePath = utils.resolvePath(
core.getInput(Inputs.Path, { required: true }) core.getInput(Inputs.Path, { required: true })
); );
/** TODO use `core.getInputList` instead - see https://github.com/actions/toolkit/pull/336 */
let cachePathList = core
.getInput(Inputs.Paths, { required: false })
.split("\n")
.filter(x => x !== "")
.map(path => utils.resolvePath(path));
cachePathList = [cachePath, ...cachePathList];
core.debug(`Cache Path: ${cachePath}`); core.debug(`Cache Path: ${cachePath}`);
const archivePath = path.join( const archivePath = path.join(