Fix: Remove event validation

This commit is contained in:
Andreas Möller 2020-05-17 10:25:49 +02:00
parent 16a133d9a7
commit 9572935725
No known key found for this signature in database
GPG key ID: 9FB20A0BAF60E11F
9 changed files with 3 additions and 116 deletions

View file

@ -11,7 +11,6 @@ import {
CacheFilename,
CompressionMethod,
Outputs,
RefKey,
State
} from "../constants";
import { ArtifactCacheEntry } from "../contracts";
@ -108,12 +107,6 @@ export async function resolvePaths(patterns: string[]): Promise<string[]> {
return paths;
}
// Cache token authorized for all events that are tied to a ref
// 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 {
return RefKey in process.env && Boolean(process.env[RefKey]);
}
export function unlinkFile(path: fs.PathLike): Promise<void> {
return util.promisify(fs.unlink)(path);
}