mirror of
https://gitea.com/actions/govulncheck-action.git
synced 2026-12-05 19:01:55 +00:00
action.yml: don't default go-version over go-version-file
The go-version-input input defaults to "stable", which actions/setup-go prefers over go-version-file. This makes go-version-file a no-op unless go-version-input is first set to "". Default go-version-input to "" instead, and fall back to "stable" later if neither go-version-input nor go-version-file is set. Change-Id: I1d3d5abc83686e96078d7faaf1472d8713f3974e GitHub-Last-Rev: 2ad299b5e83c081a26956f9689c558feb90cdcae GitHub-Pull-Request: golang/govulncheck-action#15 Reviewed-on: https://go-review.googlesource.com/c/govulncheck-action/+/862401 Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: David Chase <drchase@google.com> TryBot-Bypass: Sean Liao <sean@liao.dev> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
1 parent
032d45514a
commit
d7259e3867
1 file changed
+3
-2
+3
-2
@@ -4,7 +4,7 @@ inputs:
|
||||
go-version-input: # version of Go to use for govulncheck
|
||||
description: 'Version of Go to use for govulncheck'
|
||||
required: false
|
||||
default: 'stable'
|
||||
default: ''
|
||||
check-latest:
|
||||
description: 'Set this option to true if you want the action to always check for the latest available Go version that satisfies the version spec'
|
||||
required: false
|
||||
@@ -47,7 +47,8 @@ runs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
||||
with:
|
||||
go-version: ${{ inputs.go-version-input }}
|
||||
# go-version overrides go-version-file, so only default to stable without it
|
||||
go-version: ${{ inputs.go-version-input || (inputs.go-version-file == '' && 'stable' || '') }}
|
||||
check-latest: ${{ inputs.check-latest }}
|
||||
go-version-file: ${{ inputs.go-version-file }}
|
||||
cache: ${{ inputs.cache }}
|
||||
|
||||
Reference in new issue
Block a user