adjusting defaults for version input
All checks were successful
tests / test-gomod (push) Successful in 24s
tests / test-versioninput (push) Successful in 29s

This commit is contained in:
2026-05-27 14:51:09 -04:00
parent d0bce850e0
commit c1d74565a3
2 changed files with 1 additions and 2 deletions

View File

@@ -16,7 +16,6 @@ inputs:
version: version:
description: "Optional, the Go version to install if no go.mod file is present" description: "Optional, the Go version to install if no go.mod file is present"
required: false required: false
default: "."
runs: runs:
using: composite using: composite
steps: steps:

View File

@@ -39,7 +39,7 @@ function fixVersion {
echo "Parsing go version" echo "Parsing go version"
#check install version field first #check install version field first
if [[ -z $GO_INSTALL_VERSION ]]; then if [[ -z "$GO_INSTALL_VERSION" ]]; then
echo "No version input found, checking go.mod files" echo "No version input found, checking go.mod files"
# -P uses perl syntax # -P uses perl syntax
DL_VERSION_RAW="$(grep "^go [0-9]+.[0-9]+" go.mod -P)" DL_VERSION_RAW="$(grep "^go [0-9]+.[0-9]+" go.mod -P)"