-
Notifications
You must be signed in to change notification settings - Fork 260
89 lines (84 loc) · 2.26 KB
/
lint.yml
File metadata and controls
89 lines (84 loc) · 2.26 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
86
87
88
89
---
# lint runs all linters in this repository
# This workflow is triggered by ci.yml workflow
name: lint
permissions:
contents: read
"on":
workflow_call:
jobs:
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-go@v6.4.0
with:
go-version-file: ./go.mod
# This steps sets the GIT_DIFF environment variable to true
# if files defined in PATTERS changed
- uses: technote-space/get-diff-action@v6.1.2
with:
# This job will pass without running if go.mod, go.sum, and *.go
# wasn't modified.
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v9.2.0
with:
version: latest
args: --timeout 10m ./...
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: hadolint/hadolint-action@v3.3.0
with:
recursive: true
failure-threshold: error
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/*.yml
**/*.yaml
- uses: evstack/.github/.github/actions/yamllint@v0.5.0
if: env.GIT_DIFF
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/*.md
- uses: evstack/.github/.github/actions/markdown-lint@v0.5.0
if: env.GIT_DIFF
# Checks that the .goreleaser.yaml file is valid
goreleaser-check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
.goreleaser.yaml
.goreleaser.yml
- uses: goreleaser/goreleaser-action@v7
with:
version: latest
args: check
if: env.GIT_DIFF