Skip to content

Commit a62bbe1

Browse files
committed
feat: add go-version input to go-check
1 parent b529847 commit a62bbe1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/go-check.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Go Checks
22
on:
33
workflow_call:
4+
inputs:
5+
go-version:
6+
required: false
7+
type: string
48

59
jobs:
610
unit:
@@ -16,7 +20,7 @@ jobs:
1620
uses: pl-strflt/uci/.github/actions/read-go-mod@main
1721
- uses: actions/setup-go@v4
1822
with:
19-
go-version: ${{ fromJSON(steps.go-mod.outputs.json).Go }}.x
23+
go-version: ${{ inputs.go-version || (fromJSON(steps.go-mod.outputs.json).Go && format('{0}.x', fromJSON(steps.go-mod.outputs.json).Go)) }}
2024
cache: false
2125
- name: Run repo-specific setup
2226
uses: ./.github/actions/go-check-setup

0 commit comments

Comments
 (0)