This repository was archived by the owner on May 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +96
-1
lines changed Expand file tree Collapse file tree 4 files changed +96
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
3
+ name : Lint
4
+
5
+ on :
6
+ workflow_dispatch : {}
7
+
8
+ pull_request :
9
+ paths :
10
+ - " *.yaml"
11
+
12
+ jobs :
13
+ yamllint :
14
+ uses : ./.github/workflows/reusable-yamllint.yaml
15
+ secrets : inherit
16
+ with :
17
+ yamllint-args : " --config-file=.yamllint.yaml"
Original file line number Diff line number Diff line change 14
14
type : string
15
15
description : The version of golangci-lint to use.
16
16
required : false
17
- default : " v1.60" # TODO add renovate annotation
17
+ default : " v1.60" # TODO add renovate annotation
18
18
golangci-args :
19
19
type : string
20
20
description : Additional arguments to pass to golangci
Original file line number Diff line number Diff line change
1
+ ---
2
+ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
3
+ name : Reusable - GolangCI Lint
4
+
5
+ on :
6
+ workflow_call :
7
+ inputs :
8
+ python-version :
9
+ type : string
10
+ description : The Python version to use.
11
+ required : false
12
+ default : " 3.12"
13
+ yamllint-version :
14
+ type : string
15
+ description : The version of yamllint to use.
16
+ required : false
17
+ default : " 1.35.1"
18
+ yamllint-args :
19
+ type : string
20
+ description : Additional arguments to pass to yamllint.
21
+ required : false
22
+ default : " "
23
+ working-directory :
24
+ type : string
25
+ description : The directory to lint.
26
+ required : false
27
+ default : " ."
28
+
29
+ jobs :
30
+ lint :
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - name : Generate Token
34
+ uses : actions/create-github-app-token@3378cda945da322a8db4b193e19d46352ebe2de5 # v1.10.4
35
+ id : app-token
36
+ with :
37
+ app-id : " ${{ secrets.BOT_APP_ID }}"
38
+ private-key : " ${{ secrets.BOT_APP_PRIVATE_KEY }}"
39
+
40
+ - name : Checkout
41
+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
42
+ with :
43
+ token : " ${{ steps.app-token.outputs.token }}"
44
+
45
+ - name : Set up Python
46
+ uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
47
+ with :
48
+ python-version : " ${{ inputs.python-version }}"
49
+
50
+ - name : Install yamllint
51
+ run : pip install yamllint==${{ inputs.yamllint-version }}
52
+
53
+ - name : Run yamllint
54
+ run : yamllint ${{ inputs.yamllint-args }} ${{ inputs.working-directory }}
Original file line number Diff line number Diff line change
1
+ ---
2
+ # yaml-language-server: $schema=https://json.schemastore.org/yamllint.json
3
+ extends : default
4
+
5
+ rules :
6
+ comments :
7
+ min-spaces-from-content : 1
8
+
9
+ line-length :
10
+ max : 150
11
+
12
+ braces :
13
+ level : warning
14
+ max-spaces-inside : 1
15
+
16
+ brackets :
17
+ level : warning
18
+ max-spaces-inside : 1
19
+
20
+ # Ignore truthy for github workflows due to dummy trigger on the
21
+ # 'on:' clause
22
+ truthy :
23
+ ignore :
24
+ - .github/workflows
You can’t perform that action at this time.
0 commit comments