Skip to content

Commit 5c0c380

Browse files
ci(go): utilize go.mod for go version (#159)
1 parent 97bd21c commit 5c0c380

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ jobs:
1111
name: lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/setup-go@v3
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Go
17+
uses: actions/setup-go@v5
1518
with:
16-
go-version: 1.19
17-
- uses: actions/checkout@v3
19+
go-version-file: go.mod
20+
check-latest: true
1821
- name: golangci-lint
1922
uses: golangci/golangci-lint-action@v3
2023
with:

.github/workflows/main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ on:
66
pull_request:
77
branches: [ master ]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build-and-test:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1417

1518
- name: Setup Go
16-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v5
1720
with:
18-
go-version: '1.19'
21+
go-version-file: go.mod
22+
check-latest: true
1923

2024
- name: Run build
2125
run: go build .

0 commit comments

Comments
 (0)