-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
54 lines (44 loc) · 1.57 KB
/
Copy pathlint.yml
File metadata and controls
54 lines (44 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Lint
on:
push:
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up mise
uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: go-cache-paths
shell: bash
run: |
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
echo "golangci-lint-cache=$HOME/.cache/golangci-lint" >> "$GITHUB_OUTPUT"
- name: Go Build Cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-lint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-build-lint-
- name: Go Mod Cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: golangci-lint Cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
with:
path: ${{ steps.go-cache-paths.outputs.golangci-lint-cache }}
key: ${{ runner.os }}-golangci-lint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golangci-lint-
- name: Lint
run: make lint-allow-list