Changes for src/utils/actionUtils.ts: 14 added lines, 1 removed line.
Original line number
Diff line number
Diff line
@@ -4,7 +4,8 @@ import * as fs from "fs";
import*as osfrom"os";
import*as pathfrom"path";
import*as uuidV4from"uuid/v4";
import{Outputs,State}from"../constants";
import{Events,Outputs,State}from"../constants";
import{ArtifactCacheEntry}from"../contracts";
// From https://github.com/actions/toolkit/blob/master/packages/tool-cache/src/tool-cache.ts#L23
@@ -83,3 +84,15 @@ export function resolvePath(filePath: string): string {
returnpath.resolve(filePath);
}
exportfunctiongetSupportedEvents():string[]{
return[Events.Push,Events.PullRequest];
}
// Currently the cache token is only authorized for push and pull_request events
// All other events will fail when reading and saving the cache
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context