Skip to content

Commit

Permalink
Export BAZELISK_GITHUB_TOKEN variable
Browse files Browse the repository at this point in the history
Fixes #57
  • Loading branch information
p0deje committed Jan 5, 2025
1 parent 99f63cf commit 438b351
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ if (externalCacheConfig) {
}
}

const token = core.getInput('token')
core.exportVariable('BAZELISK_GITHUB_TOKEN', token)

module.exports = {
baseCacheKey,
bazeliskCache: {
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ async function downloadBazelisk() {
filename = `${filename}.exe`
}

const token = core.getInput('token')
const octokit = github.getOctokit(token, {
const octokit = github.getOctokit(process.env.BAZELISK_GITHUB_TOKEN, {
baseUrl: 'https://api.github.com'
})
const { data: releases } = await octokit.rest.repos.listReleases({
Expand Down

0 comments on commit 438b351

Please sign in to comment.