Skip to content

Commit 427e786

Browse files
committed
ci: Update setup-go to use Go version from go.mod
This uses the ecosystem standard of defining the minimum Go version to build the package, as well as the Go toolchain the release is built with.
1 parent e130513 commit 427e786

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/pr.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ jobs:
1717
- name: setup go
1818
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@v6
1919
with:
20-
go-version: "1.25.x"
21-
cache: false
20+
go-version-file: 'go.mod'
2221

2322
- name: validate conventional commit prefix
2423
working-directory: scripts
@@ -71,8 +70,7 @@ jobs:
7170
- name: setup go
7271
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@v6
7372
with:
74-
go-version: "1.25.x"
75-
cache: false
73+
go-version-file: 'go.mod'
7674

7775
- name: build
7876
run: make build

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
- name: setup go
106106
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@v6
107107
with:
108-
go-version: "1.25.x"
108+
go-version-file: 'go.mod'
109109

110110
- name: release
111111
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # ratchet:goreleaser/goreleaser-action@v6

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module github.com/open-policy-agent/conftest
22

33
go 1.25.3
44

5+
toolchain go1.25.6
6+
57
require (
68
cuelang.org/go v0.15.3
79
github.com/BurntSushi/toml v1.6.0

0 commit comments

Comments
 (0)