run prettier

This commit is contained in:
George Adams 2026-02-13 15:51:56 +00:00
commit 107f2fc644
5 changed files with 9 additions and 23 deletions

View file

@ -10,9 +10,6 @@ on:
paths-ignore:
- '**.md'
env:
MICROSOFT_GO_BASE_URL: 'https://aka.ms/golang/release/latest'
jobs:
microsoft-basic:
name: 'Microsoft build of Go ${{ matrix.go-version }} on ${{ matrix.os }}'
@ -29,7 +26,7 @@ jobs:
uses: ./
with:
go-version: ${{ matrix.go-version }}
go-download-base-url: ${{ env.MICROSOFT_GO_BASE_URL }}
go-download-base-url: 'https://aka.ms/golang/release/latest'
cache: false
- name: Verify Go installation
@ -104,7 +101,7 @@ jobs:
uses: ./
with:
go-version: '1.25'
go-download-base-url: ${{ env.MICROSOFT_GO_BASE_URL }}
go-download-base-url: 'https://aka.ms/golang/release/latest'
architecture: ${{ matrix.architecture }}
cache: false
@ -125,7 +122,7 @@ jobs:
uses: ./
with:
go-version: '1.25'
go-download-base-url: ${{ env.MICROSOFT_GO_BASE_URL }}
go-download-base-url: 'https://aka.ms/golang/release/latest'
cache: true
- name: Verify Go installation

View file

@ -55,7 +55,7 @@ See [action.yml](action.yml).
# Architecture to install (auto-detected if not specified)
architecture: 'x64'
# Custom base URL for Go downloads (e.g., for mirrors or Microsoft Go)
# Custom base URL for Go downloads (e.g., for mirrors)
go-download-base-url: ''
```
<!-- end usage -->

View file

@ -129,8 +129,9 @@ describe('setup-go', () => {
});
afterEach(() => {
// clear out env var set during 'run'
// clear out env vars set during 'run'
delete process.env[im.GOTOOLCHAIN_ENV_VAR];
delete process.env['GO_DOWNLOAD_BASE_URL'];
//jest.resetAllMocks();
jest.clearAllMocks();
@ -1272,8 +1273,6 @@ use .
`Using custom Go download base URL: ${customBaseUrl}`
);
expect(logSpy).toHaveBeenCalledWith('Install from custom download URL');
delete process.env['GO_DOWNLOAD_BASE_URL'];
});
it('input takes precedence over environment variable', async () => {
@ -1302,8 +1301,6 @@ use .
expect(logSpy).toHaveBeenCalledWith(
`Acquiring go1.13.1 from ${inputUrl}/go1.13.1.linux-amd64.tar.gz`
);
delete process.env['GO_DOWNLOAD_BASE_URL'];
});
it('errors when stable alias is used with custom URL', async () => {

View file

@ -20,7 +20,7 @@ inputs:
architecture:
description: 'Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.'
go-download-base-url:
description: 'Custom base URL for downloading Go distributions. Use this to download Go from a mirror or custom source (e.g., for Microsoft Go). Defaults to "https://go.dev/dl". Can also be set via the GO_DOWNLOAD_BASE_URL environment variable. The input takes precedence over the environment variable.'
description: 'Custom base URL for downloading Go distributions. Use this to download Go from a mirror or custom source. Defaults to "https://go.dev/dl". Can also be set via the GO_DOWNLOAD_BASE_URL environment variable. The input takes precedence over the environment variable.'
outputs:
go-version:
description: 'The installed Go version. Useful when given a version range as input.'

View file

@ -157,13 +157,7 @@ export async function getGo(
// Try download from internal distribution (popular versions only)
//
try {
info = await getInfoFromManifest(
versionSpec,
true,
auth,
arch,
manifest
);
info = await getInfoFromManifest(versionSpec, true, auth, arch, manifest);
if (info) {
downloadPath = await installGoVersion(info, auth, arch);
} else {
@ -485,9 +479,7 @@ export function getInfoFromDirectDownload(
const fileName = `${goVersion}.${platStr}-${archStr}.${extension}`;
const downloadUrl = `${goDownloadBaseUrl}/${fileName}`;
core.info(
`Constructed direct download URL: ${downloadUrl}`
);
core.info(`Constructed direct download URL: ${downloadUrl}`);
return <IGoVersionInfo>{
type: 'dist',