-
Notifications
You must be signed in to change notification settings - Fork 170
68 lines (63 loc) · 1.62 KB
/
lint.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Lint
on:
merge_group:
types: [checks_requested]
pull_request:
concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
golangci:
name: Run golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/*.go
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
cache: true
- name: golangci-lint main
uses: golangci/golangci-lint-action@v6
if: env.GIT_DIFF
with:
version: latest
args: --timeout 8m
markdown-lint:
name: markdown-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# lint only changed files
- uses: tj-actions/changed-files@v44
id: changed-files
with:
files: "**/*.md"
separator: ","
- uses: DavidAnson/markdownlint-cli2-action@v16
if: steps.changed-files.outputs.any_changed == 'true'
with:
globs: ${{ steps.changed-files.outputs.all_changed_files }}
separator: ","
buf-lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/*.proto
- uses: bufbuild/buf-setup-action@v1
if: env.GIT_DIFF
- uses: bufbuild/buf-lint-action@v1
if: env.GIT_DIFF
with:
input: "proto"