Skip to content

Commit

Permalink
cache golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nawazkh committed Oct 3, 2024
1 parent 1efc2d6 commit f5bd1a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/pr-golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,31 @@ jobs:
- test
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7

- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT

- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2
with:
go-version: ${{ steps.vars.outputs.go_version }}

- name: Cache golangci-lint binary
id: golangci-cache
uses: actions/cache@v3
with:
# Cache location used by golangci-lint-action
path: ~/.cache/golangci-lint
# Change this when updating golangci-lint version
key: golangci-lint-v1.60.2
restore-keys: |
golangci-lint-
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # tag=v6.1.0
with:
# update the version when updating golangci-lint
version: v1.60.2
args: --out-format=colored-line-number
working-directory: ${{matrix.working-directory}}

0 comments on commit f5bd1a2

Please sign in to comment.