Skip to content

Commit f5bd1a2

Browse files
committed
cache golangci-lint
1 parent 1efc2d6 commit f5bd1a2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/pr-golangci-lint.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,31 @@ jobs:
1919
- test
2020
steps:
2121
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7
22+
2223
- name: Calculate go version
2324
id: vars
2425
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
26+
2527
- name: Set up Go
2628
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2
2729
with:
2830
go-version: ${{ steps.vars.outputs.go_version }}
31+
32+
- name: Cache golangci-lint binary
33+
id: golangci-cache
34+
uses: actions/cache@v3
35+
with:
36+
# Cache location used by golangci-lint-action
37+
path: ~/.cache/golangci-lint
38+
# Change this when updating golangci-lint version
39+
key: golangci-lint-v1.60.2
40+
restore-keys: |
41+
golangci-lint-
42+
2943
- name: golangci-lint
3044
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # tag=v6.1.0
3145
with:
46+
# update the version when updating golangci-lint
3247
version: v1.60.2
3348
args: --out-format=colored-line-number
3449
working-directory: ${{matrix.working-directory}}

0 commit comments

Comments
 (0)