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:
Pierre-Emmanuel Mercier 2025-11-13 11:51:37 +01:00 committed by GitHub
parent bccc99f675
commit 5d59d4d41c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

5
dist/index.js generated vendored
View file

@ -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

File diff suppressed because one or more lines are too long

View file

@ -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.'
)
}