mirror of
https://github.com/actions/cache.git
synced 2025-04-21 19:46:46 +00:00
PR Feedback
This commit is contained in:
parent
bae12fc444
commit
ead4a0a409
3 changed files with 13 additions and 4 deletions
|
@ -90,5 +90,9 @@ export function resolvePath(filePath: string): string {
|
|||
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
|
||||
export function isValidEvent(): boolean {
|
||||
const githubEvent = process.env[Events.Key] || "";
|
||||
return githubEvent === Events.Push || githubEvent === Events.PullRequest;
|
||||
return getSupportedEvents().includes(githubEvent);
|
||||
}
|
||||
|
||||
export function getSupportedEvents(): string[] {
|
||||
return [Events.Push, Events.PullRequest];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue