From 9a9c8d77fd19230e581bc2c780982aa2d0a89de8 Mon Sep 17 00:00:00 2001 From: Kipras Melnikovas Date: Fri, 7 Feb 2020 01:24:50 +0200 Subject: [PATCH] Create `cachePathList` @ `save.ts` Signed-off-by: Kipras Melnikovas --- src/save.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/save.ts b/src/save.ts index de03856..e3887e5 100644 --- a/src/save.ts +++ b/src/save.ts @@ -46,6 +46,16 @@ async function run(): Promise { const cachePath = utils.resolvePath( 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}`); const archivePath = path.join(