mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Go: specify Go runtime version in actions
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
name: Test go extractor
|
||||
description: Run build, QL tests and optionally basic code sanity checks (formatting and generation)
|
||||
inputs:
|
||||
go-version:
|
||||
description: Which Go version to use for running the tests
|
||||
required: false
|
||||
default: ~1.22.0
|
||||
run-code-checks:
|
||||
description: Whether to run formatting, code and qhelp generation checks
|
||||
required: false
|
||||
@@ -8,18 +12,10 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Get go version
|
||||
shell: bash
|
||||
run: |
|
||||
(
|
||||
echo -n "GO_VERSION="
|
||||
bazel run @rules_go//go -- version | sed 's/go version go\(.*\) .*/\1/'
|
||||
) | tee -a "$GITHUB_ENV"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
go-version: ${{ inputs.go-version }}
|
||||
cache: false
|
||||
id: go
|
||||
|
||||
|
||||
Reference in New Issue
Block a user