Validate event type during restore

This commit is contained in:
Josh Gross 2019-11-07 14:15:44 -05:00
parent 4b0709a0d5
commit bae12fc444
4 changed files with 119 additions and 2 deletions

View file

@ -11,6 +11,12 @@ import * as utils from "./utils/actionUtils";
async function run() {
try {
// Validate inputs, this can cause task failure
if (!utils.isValidEvent()) {
core.setFailed(
`Event Validation Error: The event type ${process.env["GITHUB_EVENT_NAME"]} is not supported. Only \`push\` and \`pull_request\` events are supported at this time.`
);
}
let cachePath = utils.resolvePath(
core.getInput(Inputs.Path, { required: true })
);