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:
20
src/save-only.ts
Normal file
20
src/save-only.ts
Normal 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;
|
||||
Reference in New Issue
Block a user