mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 03:23:59 +00:00
* docs: update documentation * feat: validate-inputs has it's own pyproject * security: mask DOCKERHUB_PASSWORD * chore: add tokens, checkout, recrete docs, integration tests * fix: add `statuses: write` permission to pr-lint
43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
# ivuorinen/actions/go-version-detect
|
|
|
|
## Go Version Detect
|
|
|
|
### Description
|
|
|
|
Detects the Go version from the project's go.mod file or defaults to a specified version.
|
|
|
|
### Inputs
|
|
|
|
| name | description | required | default |
|
|
|-------------------|----------------------------------------------------------|----------|---------|
|
|
| `default-version` | <p>Default Go version to use if go.mod is not found.</p> | `false` | `1.25` |
|
|
| `token` | <p>GitHub token for authentication</p> | `false` | `""` |
|
|
|
|
### Outputs
|
|
|
|
| name | description |
|
|
|--------------|----------------------------------------|
|
|
| `go-version` | <p>Detected or default Go version.</p> |
|
|
|
|
### Runs
|
|
|
|
This action is a `composite` action.
|
|
|
|
### Usage
|
|
|
|
```yaml
|
|
- uses: ivuorinen/actions/go-version-detect@main
|
|
with:
|
|
default-version:
|
|
# Default Go version to use if go.mod is not found.
|
|
#
|
|
# Required: false
|
|
# Default: 1.25
|
|
|
|
token:
|
|
# GitHub token for authentication
|
|
#
|
|
# Required: false
|
|
# Default: ""
|
|
```
|