Fall back to downloading from dl.google.com/go instead of storage.googleapis.com/golang

This commit is contained in:
Nicholas Ngai 2025-10-17 11:21:33 -07:00
parent c0137caad7
commit e7835015ff
No known key found for this signature in database
GPG key ID: 65358B5A905963F4
4 changed files with 6 additions and 6 deletions

View file

@ -389,7 +389,7 @@ describe('setup-go', () => {
const expPath = path.win32.join(toolPath, 'bin');
expect(dlSpy).toHaveBeenCalledWith(
'https://storage.googleapis.com/golang/go1.13.1.windows-amd64.zip',
'https://dl.google.com/go/go1.13.1.windows-amd64.zip',
'C:\\temp\\go1.13.1.windows-amd64.zip',
undefined
);
@ -946,7 +946,7 @@ use .
const expectedUrl =
platform === 'win32'
? `https://github.com/actions/go-versions/releases/download/${version}/go-${version}-${platform}-${arch}.${fileExtension}`
: `https://storage.googleapis.com/golang/go${version}.${osSpec}-${arch}.${fileExtension}`;
: `https://dl.google.com/go/go${version}.${osSpec}-${arch}.${fileExtension}`;
// ... but not in the local cache
findSpy.mockImplementation(() => '');