Files
install-go/README.md

29 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2025-03-31 15:26:35 -04:00
# install-go
2025-05-23 01:32:32 +00:00
![tests](https://code.jakeyoungdev.com/actions/install-go/actions/workflows/test.yaml/badge.svg?branch=main&event=push) <br />
2025-03-31 15:26:35 -04:00
An extremely simple github action to install golang and golang commands (using "go install") on linux hosts. This provides the ability to install and setup golang without node/typescript which is required when using [actions/setup-go](https://github.com/actions/setup-go).
## Usage
2026-05-27 14:45:39 -04:00
Use a tagged release to avoid unexpected changes that may come to the main branch
2025-03-31 15:26:35 -04:00
```yaml
name: "install go"
2026-05-27 14:45:39 -04:00
uses: https://code.jakeyoungdev.com/actions/install-go@main
2025-03-31 15:26:35 -04:00
with:
commands: |
2025-04-20 05:28:17 +00:00
code.jakeyoungdev.com/jake/mctl@v0.3.3
2025-03-31 15:26:35 -04:00
```
#### Go verions
2026-05-27 14:45:39 -04:00
The go version installed is either determined by the version input, or the version found in a go.mod file if the input is not set. Go files are pulled directly from the Go download [site](https://go.dev/dl/) and all go commands are installed using 'go install' after setup. If a different version of Go is already installed the 'purge' input must be set to 'yes' to remove it and avoid errors.
2025-05-22 21:49:48 -04:00
2025-03-31 15:26:35 -04:00
#### Inputs
Some inputs are available to customize the installation
|Input|Required|Values|Default|Description|
|---|---|---|---|---|
2025-05-22 21:49:48 -04:00
|arch|no|any arch for Go|amd64|system architecture for go
|purge|no|yes/no|no|remove any go files found on system before install
2025-03-31 15:49:08 -04:00
|commands|no|any public go repositories|.|links to any commands to be installed using 'go install'
2026-05-27 14:45:39 -04:00
|version|no|any go version|version in go.mod file|the go version to install
2025-03-31 15:26:35 -04:00
## Issues
This repo is a as brain-dead as I could make it and is intended to be as fast and low-level as possible. Please open an issue for any problems or suggestions.