1+ ---
12# lint runs all linters in this repository
2- # This workflow is triggered by ci_release .yml workflow
3+ # This workflow is triggered by ci .yml workflow
34name : lint
4- on :
5+ permissions :
6+ contents : read
7+ " on " :
58 workflow_call :
69
710jobs :
1316 - uses : actions/setup-go@v6
1417 with :
1518 go-version-file : ./go.mod
16- # This steps sets the GIT_DIFF environment variable to true
17- # if files defined in PATTERS changed
19+ # This steps sets the GIT_DIFF environment variable to true
20+ # if files defined in PATTERS changed
1821 - uses : technote-space/get-diff-action@v6.1.2
1922 with :
2023 # This job will pass without running if go.mod, go.sum, and *.go
@@ -30,32 +33,57 @@ jobs:
3033 github-token : ${{ secrets.github_token }}
3134 if : env.GIT_DIFF
3235
33- # hadolint lints the Dockerfile
3436 hadolint :
35- uses : evstack/.github/.github/workflows/reusable_dockerfile_lint.yml@v0.5.0 # yamllint disable-line rule:line-length
36- with :
37- dockerfile : Dockerfile
38- failure-threshold : error
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v5
40+ - uses : hadolint/hadolint-action@v3.3.0
41+ with :
42+ recursive : true
43+ failure-threshold : error
3944
4045 yamllint :
4146 runs-on : ubuntu-latest
4247 steps :
4348 - uses : actions/checkout@v5
49+ with :
50+ fetch-depth : 0
51+ - uses : technote-space/get-diff-action@v6.1.2
52+ with :
53+ PATTERNS : |
54+ **/*.yml
55+ **/*.yaml
4456 - uses : evstack/.github/.github/actions/yamllint@v0.5.0
57+ if : env.GIT_DIFF
4558
4659 markdown-lint :
4760 runs-on : ubuntu-latest
4861 steps :
4962 - uses : actions/checkout@v5
63+ with :
64+ fetch-depth : 0
65+ - uses : technote-space/get-diff-action@v6.1.2
66+ with :
67+ PATTERNS : |
68+ **/*.md
5069 - uses : evstack/.github/.github/actions/markdown-lint@v0.5.0
70+ if : env.GIT_DIFF
5171
5272 # Checks that the .goreleaser.yaml file is valid
5373 goreleaser-check :
5474 runs-on : ubuntu-latest
5575 steps :
5676 - name : checkout
5777 uses : actions/checkout@v5
78+ with :
79+ fetch-depth : 0
80+ - uses : technote-space/get-diff-action@v6.1.2
81+ with :
82+ PATTERNS : |
83+ .goreleaser.yaml
84+ .goreleaser.yml
5885 - uses : goreleaser/goreleaser-action@v6
5986 with :
6087 version : latest
6188 args : check
89+ if : env.GIT_DIFF
0 commit comments