mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 08:43:55 +08:00
Validate event type during restore
This commit is contained in:
parent
4b0709a0d5
commit
bae12fc444
4 changed files with 119 additions and 2 deletions
|
@ -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 })
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue