mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 13:50:33 +00:00
fix: avoid github token downstream issue (#317)
Fix https://github.com/jdx/mise-action/issues/298 https://mise.jdx.dev/getting-started.html#github-api-rate-limiting --------- Co-authored-by: Pierre-Emmanuel MERCIER <p.mercier@betclicgroup.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
bccc99f675
commit
5d59d4d41c
3 changed files with 7 additions and 5 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -50147,10 +50147,11 @@ async function setEnvVars() {
|
|||
set('MISE_LOG_LEVEL', logLevel);
|
||||
const githubToken = core.getInput('github_token');
|
||||
if (githubToken) {
|
||||
set('GITHUB_TOKEN', githubToken);
|
||||
// Don't use GITHUB_TOKEN, use MISE_GITHUB_TOKEN instead to avoid downstream issues.
|
||||
set('MISE_GITHUB_TOKEN', githubToken);
|
||||
}
|
||||
else {
|
||||
core.warning('No GITHUB_TOKEN provided. You may hit GitHub API rate limits when installing tools from GitHub.');
|
||||
core.warning('No MISE_GITHUB_TOKEN provided. You may hit GitHub API rate limits when installing tools from GitHub.');
|
||||
}
|
||||
set('MISE_TRUSTED_CONFIG_PATHS', process.cwd());
|
||||
set('MISE_YES', '1');
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -176,10 +176,11 @@ async function setEnvVars(): Promise<void> {
|
|||
|
||||
const githubToken = core.getInput('github_token')
|
||||
if (githubToken) {
|
||||
set('GITHUB_TOKEN', githubToken)
|
||||
// Don't use GITHUB_TOKEN, use MISE_GITHUB_TOKEN instead to avoid downstream issues.
|
||||
set('MISE_GITHUB_TOKEN', githubToken)
|
||||
} else {
|
||||
core.warning(
|
||||
'No GITHUB_TOKEN provided. You may hit GitHub API rate limits when installing tools from GitHub.'
|
||||
'No MISE_GITHUB_TOKEN provided. You may hit GitHub API rate limits when installing tools from GitHub.'
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue