1
mirror of https://github.com/actions/cache.git synced 2026-02-14 22:20:33 +00:00

adding wrapper to save-only and testcases

This commit is contained in:
Tanuj Kumar Mishra
2022-12-01 15:50:23 +00:00
parent a92fb881ae
commit 0685539942
7 changed files with 61622 additions and 77 deletions

20
src/save-only.ts Normal file
View File

@@ -0,0 +1,20 @@
import * as core from "@actions/core";
import { Inputs } from "./constants";
import save from "./save";
import * as utils from "./utils/actionUtils";
async function runSaveAction(): Promise<void> {
if (!core.getInput(Inputs.Key)) {
utils.logWarning(`Error retrieving key from inputs.`);
return;
}
saveOnly = true;
await save();
}
runSaveAction();
export default runSaveAction;
export let saveOnly: boolean;