mirror of
https://github.com/Swatinem/rust-cache.git
synced 2025-07-19 07:11:24 +03:00
add description
This commit is contained in:
@ -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"
|
||||
|
@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user