Skip to content

Commit e0462ab

Browse files
authored
Merge pull request #1229 from tianon/setup-go
Reduce maintenance burden by letting setup-go track our Go versions
2 parents cf536e3 + 6a277dd commit e0462ab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/docs-and-linting.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
strategy:
1111
matrix:
1212
# current Go releases plus the version in the go.mod are tested
13-
go: ['1.18', '1.22', '1.23']
13+
go: ['go.mod', 'oldstable', 'stable']
14+
# https://github.com/actions/setup-go/tree/v5#getting-go-version-from-the-gomod-file
15+
# https://github.com/actions/setup-go/tree/v5#using-stableoldstable-aliases
1416

1517
env:
1618
RELEASE_GO_VER: "1.23"
@@ -24,7 +26,9 @@ jobs:
2426

2527
- uses: actions/setup-go@v5
2628
with:
27-
go-version: ${{ matrix.go }}
29+
go-version: ${{ matrix.go != 'go.mod' && matrix.go || null }}
30+
go-version-file: ${{ matrix.go == 'go.mod' && 'go/src/github.com/opencontainers/image-spec/go.mod' || null }}
31+
cache-dependency-path: go/src/github.com/opencontainers/image-spec/go.sum
2832

2933
- name: Render and Lint
3034
env:

0 commit comments

Comments
 (0)