Accept GITHUB_TOKEN environment variable

This commit is contained in:
Ross MacArthur
2020-05-02 21:34:01 +02:00
parent 462b1e9145
commit 3a8567bdeb
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -14,7 +14,7 @@ class Release {
}
async function getRelease(versionSpec?: string): Promise<Release | undefined> {
const octokit = new Octokit();
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
return octokit
.paginate(
octokit.repos.listReleases,
@@ -53,6 +53,7 @@ async function checkOrInstallTool(
// first check if we have previously donwloaded the tool
const cache = tc.find(toolName, versionSpec || "*");
if (cache) {
core.info(`${toolName} matching version spec ${versionSpec} found in cache`);
return cache;
}