-
Notifications
You must be signed in to change notification settings - Fork 53
85 lines (73 loc) · 2.33 KB
/
lint.yml
File metadata and controls
85 lines (73 loc) · 2.33 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Lint
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
jobs:
golangci:
name: lint
strategy:
fail-fast: false
matrix:
app:
- main-module
- cli
- controlplane
- artifact-cas
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: 'go.mod'
- name: Lint main module
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # 9.2.0
if: ${{ matrix.app == 'main-module' }}
with:
version: v2.9.0
only-new-issues: 'true'
- name: Lint ${{ matrix.app }}
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # 9.2.0
if: ${{ matrix.app != 'main-module' }}
with:
working-directory: app/${{ matrix.app }}
version: v2.9.0
only-new-issues: 'true'
lint-protos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: bufbuild/buf-action@5150a1eef5c10b6a5cf8a69fc872f24a09473195 # v1.1.1
with:
version: 1.49.0
token: ${{ secrets.buf_api_token }}
breaking: true
pr_comment: false
lint-dagger-module:
runs-on: ubuntu-latest
steps:
- name: Install Dagger CLI
run: |
mkdir -p ~/.local/bin
cd ~/.local
curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.19.11 sh
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: 'go.mod'
- name: Initialize module
run: |
make -C extras/dagger module-init
- name: Lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # 9.2.0
with:
working-directory: extras/dagger
version: v2.9.0
only-new-issues: 'true'