Files
cache/src/restore-only.ts

27 lines
874 B
TypeScript
Raw Normal View History

2022-11-29 08:02:27 +00:00
import * as core from "@actions/core";
import { Inputs } from "./constants";
2022-11-29 09:33:03 +00:00
import restore from "./restore";
2022-11-29 08:02:27 +00:00
async function runRestoreAction(): Promise<void> {
if (core.getInput(Inputs.SaveOnAnyFailure) != "") {
2022-11-29 08:06:41 +00:00
core.warning(
`${Inputs.SaveOnAnyFailure} value is passed in the input, this input is invalid for the restore-only action and hence will be ignored`
2022-11-29 08:02:27 +00:00
);
}
if (core.getInput(Inputs.UploadChunkSize) != "") {
2022-11-29 08:06:41 +00:00
core.warning(
`${Inputs.UploadChunkSize} value is passed in the input, this input is invalid for the restore-only action and hence will be ignored`
2022-11-29 08:02:27 +00:00
);
}
2022-11-29 08:26:52 +00:00
core.info("before run");
2022-11-29 09:33:03 +00:00
await restore();
2022-11-29 08:26:52 +00:00
core.info("after run");
2022-11-29 08:02:27 +00:00
}
2022-11-29 08:26:52 +00:00
core.info("before runRestoreAction");
2022-11-29 09:06:10 +00:00
runRestoreAction();
2022-11-29 08:26:52 +00:00
core.info("after runRestoreAction");
2022-11-29 08:02:27 +00:00
2022-11-29 08:26:52 +00:00
core.info("after export default runRestoreAction");