add description

This commit is contained in:
Arpad Borsos 2021-05-19 10:10:43 +02:00
parent f82d41bcc2
commit 3b8bbcb11d
No known key found for this signature in database
GPG Key ID: FC7BCA77824B3298
2 changed files with 9 additions and 4 deletions

View File

@ -11,9 +11,12 @@ inputs:
working-directory:
description: "The working directory this action should operate in"
required: false
target-dir:
description: "The target dir that should be cleaned and persisted, defaults to `./target`"
required: false
outputs:
cache-hit:
description: 'A boolean value that indicates an exact match was found'
description: "A boolean value that indicates an exact match was found"
runs:
using: "node12"
main: "dist/restore/index.js"

View File

@ -12,7 +12,7 @@ process.on("uncaughtException", (e) => {
});
const cwd = core.getInput("working-directory");
//todo: this could be read from .cargo config file directly
// TODO: this could be read from .cargo config file directly
const targetDir = core.getInput("target-dir") || "./target";
if (cwd) {
process.chdir(cwd);
@ -29,7 +29,7 @@ export const paths = {
index: path.join(cargoHome, "registry/index"),
cache: path.join(cargoHome, "registry/cache"),
git: path.join(cargoHome, "git"),
target: "target",
target: targetDir,
};
interface CacheConfig {
@ -138,7 +138,9 @@ export async function getCmdOutput(
}
async function getLockfileHash(): Promise<string> {
const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock\nrust-toolchain\nrust-toolchain.toml", { followSymbolicLinks: false });
const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock\nrust-toolchain\nrust-toolchain.toml", {
followSymbolicLinks: false,
});
const files = await globber.glob();
files.sort((a, b) => a.localeCompare(b));