mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-31 15:02:19 +00:00
Adding Forgejo support (#23)
Signed-off-by: Janos Bonic <86970079+janosdebugs@users.noreply.github.com> Co-authored-by: Bence Santha <bence@santha.eu>
This commit is contained in:
parent
24b9f144af
commit
da3271e0a2
6 changed files with 36 additions and 17 deletions
|
|
@ -132,13 +132,19 @@ async function run () {
|
|||
const credentialsHostname = core.getInput('cli_config_credentials_hostname');
|
||||
const credentialsToken = core.getInput('cli_config_credentials_token');
|
||||
const wrapper = core.getInput('tofu_wrapper') === 'true';
|
||||
let githubToken = core.getInput('github_token');
|
||||
if (githubToken === '' && !(process.env.FORGEJO_ACTIONS || process.env.GITEA_ACTIONS)) {
|
||||
// Only default to the environment variable when running in GitHub Actions. Don't do this for other CI systems
|
||||
// that may set the GITHUB_TOKEN environment variable.
|
||||
githubToken = process.env.GITHUB_TOKEN;
|
||||
}
|
||||
|
||||
// Gather OS details
|
||||
const osPlatform = os.platform();
|
||||
const osArch = os.arch();
|
||||
|
||||
core.debug(`Finding releases for OpenTofu version ${version}`);
|
||||
const release = await releases.getRelease(version);
|
||||
const release = await releases.getRelease(version, githubToken);
|
||||
const platform = mapOS(osPlatform);
|
||||
const arch = mapArch(osArch);
|
||||
const build = release.getBuild(platform, arch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue