mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-22 00:33:57 +08:00
Fix: Remove event validation
This commit is contained in:
parent
16a133d9a7
commit
9572935725
9 changed files with 3 additions and 116 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue