mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-31 15:02:19 +00:00
chore: check if env variable is present to be used as header
see: https://github.com/opentofu/setup-opentofu/pull/16#discussion_r1373416066 Co-authored-by: James Humphries <James@james-humphries.co.uk> Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
parent
1eab9b2ecb
commit
2ceb5c8897
2 changed files with 2 additions and 2 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -41,7 +41,7 @@ async function fetchReleases () {
|
||||||
'X-GitHub-Api-Version': '2022-11-28'
|
'X-GitHub-Api-Version': '2022-11-28'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.GITHUB_TOKEN !== '') {
|
if (process.env.GITHUB_TOKEN) {
|
||||||
headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
|
headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ async function fetchReleases () {
|
||||||
'X-GitHub-Api-Version': '2022-11-28'
|
'X-GitHub-Api-Version': '2022-11-28'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.GITHUB_TOKEN !== '') {
|
if (process.env.GITHUB_TOKEN) {
|
||||||
headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
|
headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue