Skip to content

Commit cd8d1f0

Browse files
authored
Merge pull request #1 from go-pkgz/ci/workflow-hardening
ci: harden workflows, upgrade actions, fix caching
2 parents 357c8f7 + 8f55b48 commit cd8d1f0

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ on:
66
tags:
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
1215

1316
steps:
17+
- name: checkout
18+
uses: actions/checkout@v6
19+
with:
20+
persist-credentials: false
21+
1422
- name: set up go 1.23
15-
uses: actions/setup-go@v2
23+
uses: actions/setup-go@v6
1624
with:
1725
go-version: "1.23"
1826
id: go
1927

20-
- name: checkout
21-
uses: actions/checkout@v3
22-
2328
- name: build and test
2429
run: |
2530
go get -v
@@ -31,11 +36,11 @@ jobs:
3136
TZ: "America/Chicago"
3237

3338
- name: golangci-lint
34-
uses: golangci/golangci-lint-action@v3
39+
uses: golangci/golangci-lint-action@v9
3540
with:
3641
version: latest
3742

38-
- name: install goveralls, submit coverage
43+
- name: submit coverage
3944
run: |
4045
go install github.com/mattn/goveralls@latest
4146
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: "2"
2+
3+
linters:
4+
exclusions:
5+
rules:
6+
- linters:
7+
- staticcheck
8+
text: "QF"

0 commit comments

Comments
 (0)