Skip to content

Commit

Permalink
Go: specify Go runtime version in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed May 6, 2024
1 parent c123513 commit e71d038
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions go/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
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
default: false
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

Expand Down

0 comments on commit e71d038

Please sign in to comment.