mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
Provide an input for github tokens (#172)
* Provide an input for github tokens - By providing an input for github tokens with a default users no longer have to pass the github token via their environment across workflows. - Remove GITHUB_TOKEN from our environment in all workflows * Don't run workflows on main on pull requests Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
This commit is contained in:
Vendored
+5
-2
@@ -7612,9 +7612,12 @@ async function get(url0, pageIdxs) {
|
||||
const headers = {
|
||||
'user-agent': 'setup-beam',
|
||||
}
|
||||
if (process.env.GITHUB_TOKEN) {
|
||||
headers.authorization = `Bearer ${process.env.GITHUB_TOKEN}`
|
||||
const GithubToken = getInput('github-token', false)
|
||||
|
||||
if (GithubToken) {
|
||||
headers.authorization = `Bearer ${GithubToken}`
|
||||
}
|
||||
|
||||
if (pageIdx !== null) {
|
||||
url.searchParams.append('page', pageIdx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user