This adds a new `go-download-site` input parameter that allows users to specify a custom base URL for downloading Go distributions. This is particularly useful for GitHub Enterprise Server (GHES) environments, corporate proxies, or air-gapped setups where direct access to github.com is restricted.
Changes:
- Added `go-download-site` input to `action.yml` (default: `https://github.com`)
- Updated `installer.ts` to replace the default GitHub URL with the provided custom site URL
- Updated `main.ts` to pass the input to the installer
- Added documentation in `README.md` with examples for Artifactory and GHES proxies
Resolves#296
@ -381,8 +381,80 @@ For more information about semantic versioning, see the [semver documentation](h
# Architecture to install (auto-detected if not specified)
architecture: 'x64'
# Base URL for downloading Go distributions (default: https://github.com)
go-download-site: 'https://github.com'
## Using Custom Download Sites
For environments with restricted internet access or when using internal mirrors/proxies, you can configure the action to download Go distributions from a custom location using the `go-download-site` input.
### Use Cases
- **GitHub Enterprise Server** - Access Go distributions through your internal server
- **Corporate Proxies** - Route downloads through approved proxy servers
- **Artifact Repositories** - Use internal artifact management systems (Artifactory, Nexus, etc.)
- **Air-Gapped Environments** - Download from pre-populated internal mirrors
> **Note:** The `go-download-site` parameter only affects downloads from the go-versions repository. Direct downloads from go.dev (fallback mechanism) are not affected by this setting.
## Using setup-go on GHES
setup-go comes pre-installed on GHES when Actions is enabled. For dynamic Go version downloads, the action fetches distributions from the [go-versions repository](https://github.com/actions/go-versions/) on github.com (external to your appliance).