Skip to content

chore: Add ~/.cache/golangci-lint to actions/cache #5484

chore: Add ~/.cache/golangci-lint to actions/cache

chore: Add ~/.cache/golangci-lint to actions/cache #5484

Workflow file for this run

on: [push, pull_request]
name: linter
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: stable
cache-dependency-path: "**/go.sum"
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
bin/golangci-lint
bin/custom-gcl
key: ${{ runner.os }}-${{ runner.arch }}-tools-${{ hashFiles('.custom-gcl.yml', 'tools/**/go.mod', 'tools/**/go.sum', 'tools/**/*.go') }}
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ~/.cache/golangci-lint
key: ${{ runner.os }}-${{ runner.arch }}-golangci-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-golangci-
- run: script/lint.sh
env:
CHECK_GITHUB_OPENAPI: 1
GITHUB_TOKEN: ${{ github.token }}