mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-20 03:46:17 +02:00
Create cachePathList
@ save.ts
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
This commit is contained in:
parent
35af186394
commit
9a9c8d77fd
1 changed files with 10 additions and 0 deletions
10
src/save.ts
10
src/save.ts
|
@ -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(
|
||||||
|
|
Loading…
Add table
Reference in a new issue