ci: read go version from go.mod + bump golangci-lint-action to v8
- SHA
54eabc0fb0a501883ee4ec38503de0caed3cb3e4- Parents
-
6ba040d - Tree
95009c0
54eabc0
54eabc0fb0a501883ee4ec38503de0caed3cb3e46ba040d
95009c0| Status | File | + | - |
|---|---|---|---|
| M |
.github/workflows/ci.yml
|
7 | 2 |
.github/workflows/ci.ymlmodified@@ -15,11 +15,16 @@ jobs: | ||
| 15 | 15 | |
| 16 | 16 | - uses: actions/setup-go@v5 |
| 17 | 17 | with: |
| 18 | - go-version: "1.22" | |
| 18 | + # Read the target Go version straight from go.mod so this | |
| 19 | + # workflow doesn't drift from the module on every Go bump. | |
| 20 | + go-version-file: go.mod | |
| 19 | 21 | cache: true |
| 20 | 22 | |
| 21 | 23 | - name: Install golangci-lint |
| 22 | - uses: golangci/golangci-lint-action@v6 | |
| 24 | + # v8 of the action ships with golangci-lint v2 by default, | |
| 25 | + # which is required to parse our .golangci.yml (version: "2") | |
| 26 | + # and is built with a Go new enough to load the module. | |
| 27 | + uses: golangci/golangci-lint-action@v8 | |
| 23 | 28 | with: |
| 24 | 29 | version: latest |
| 25 | 30 | args: --timeout=5m |