-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.32 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
name: Lint
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
permissions:
contents: read
jobs:
files-changed:
name: Detect file changes
runs-on: ubuntu-latest
outputs:
go: ${{ steps.changes.outputs.go }}
docs: ${{ steps.changes.outputs.docs }}
any: ${{ steps.changes.outputs.any }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for backend file changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: .github/filters.yml
golangci:
name: "golangci-lint"
needs: [ files-changed ]
if: needs.files-changed.outputs.go == 'true'
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
cache: false
go-version-file: go.mod
check-latest: true
- name: Install Ubuntu dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt install libpam0g-dev
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60