-
Notifications
You must be signed in to change notification settings - Fork 458
44 lines (42 loc) · 1.21 KB
/
go-lint.yaml
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
name: lint
on:
pull_request:
branches:
- master
paths:
- ".github/workflows/go-lint.yaml"
- "cli/**"
- "infra/blueprint-test/**"
permissions:
contents: read
concurrency:
group: '$${{ github.workflow }}-$${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
folder: [cli, infra/blueprint-test]
steps:
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20'
cache: false
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
with:
filters: |
src:
- ${{ matrix.folder }}/**
- ".github/workflows/go-lint.yaml"
- if: steps.changes.outputs.src == 'true'
name: golangci-lint
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0
with:
version: latest
working-directory: ${{ matrix.folder }}
args: --timeout=5m