1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-go synced 2025-06-09 03:52:22 +02:00

Add support for arm32 go arch (#253)

This commit is contained in:
Milos Pantic 2022-08-12 12:29:48 +02:00 committed by GitHub
parent f279813975
commit 268d8c0ca0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 127 additions and 46 deletions

View file

@ -7,6 +7,7 @@ import {restoreCache} from './cache-restore';
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
import cp from 'child_process';
import fs from 'fs';
import os from 'os';
export async function run() {
try {
@ -19,12 +20,23 @@ export async function run() {
const cache = core.getBooleanInput('cache');
core.info(`Setup go version spec ${versionSpec}`);
let arch = core.getInput('architecture');
if (!arch) {
arch = os.arch();
}
if (versionSpec) {
let token = core.getInput('token');
let auth = !token || isGhes() ? undefined : `token ${token}`;
const checkLatest = core.getBooleanInput('check-latest');
const installDir = await installer.getGo(versionSpec, checkLatest, auth);
const installDir = await installer.getGo(
versionSpec,
checkLatest,
auth,
arch
);
core.addPath(path.join(installDir, 'bin'));
core.info('Added go to the path');