Skip to content

Commit 97c091f

Browse files
authored
chore: pin go to 1.17 to fix golangci-lint failing in 1.18 (#121)
1 parent fd2d9ec commit 97c091f

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/go.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Go
22
on:
33
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
- main
49
pull_request:
510
jobs:
611
build:
@@ -10,7 +15,7 @@ jobs:
1015
- name: Set up Go 1.x
1116
uses: actions/setup-go@v2
1217
with:
13-
go-version: ^1.13
18+
go-version: 1.17
1419
- name: Check out code into the Go module directory
1520
uses: actions/checkout@v2
1621
- name: Get dependencies

.github/workflows/golangci-lint.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
name: golangci-lint
22
on:
33
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
- main
49
pull_request:
10+
permissions:
11+
contents: read
512
jobs:
613
golangci:
714
name: lint
815
runs-on: ubuntu-latest
916
steps:
17+
- uses: actions/setup-go@v2
18+
with:
19+
# golangci-lint breaks on 1.18 for now: https://github.com/golangci/golangci-lint/issues/2649
20+
# TODO(Bobgy): revert to ^1.17 for this and go.yml after it's fixed.
21+
go-version: 1.17
1022
- uses: actions/checkout@v2
1123
- name: golangci-lint
12-
uses: golangci/golangci-lint-action@v2
24+
uses: golangci/golangci-lint-action@v3
1325
with:
1426
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
1527
# NOTICE: golangci-lint version should be the same as go.mod. When upgrading, also update go.mod by:

0 commit comments

Comments
 (0)