mirror of
https://github.com/actions/setup-java.git
synced 2025-11-20 07:57:47 +00:00
github token accept through environment variable
This commit is contained in:
parent
6992528a74
commit
4c9e711992
5 changed files with 7 additions and 12 deletions
|
|
@ -183,8 +183,8 @@ export function convertVersionToSemver(version: number[] | string) {
|
|||
return mainVersion;
|
||||
}
|
||||
|
||||
export function getGitHubHttpHeaders(token?: string): OutgoingHttpHeaders {
|
||||
const resolvedToken = token || core.getInput('token');
|
||||
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
|
||||
const resolvedToken = process.env.GITHUB_TOKEN || core.getInput('token');
|
||||
const auth = !resolvedToken ? undefined : `token ${resolvedToken}`;
|
||||
|
||||
const headers: OutgoingHttpHeaders = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue