File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "problemMatcher" : [
3+ {
4+ "owner" : " yamllint" ,
5+ "pattern" : [
6+ {
7+ "regexp" : " ^(.*\\ .ya?ml)$" ,
8+ "file" : 1
9+ },
10+ {
11+ "regexp" : " ^\\ s{2}(\\ d+):(\\ d+)\\ s+(error|warning)\\ s+(.*?)\\ s+\\ ((.*)\\ )$" ,
12+ "line" : 1 ,
13+ "column" : 2 ,
14+ "severity" : 3 ,
15+ "message" : 4 ,
16+ "code" : 5 ,
17+ "loop" : true
18+ }
19+ ]
20+ }
21+ ]
22+ }
Original file line number Diff line number Diff line change 7979 python_files : ${{steps.filter.outputs.python_files}}
8080 cc : ${{steps.filter.outputs.cc}}
8181 cc_files : ${{steps.filter.outputs.cc_files}}
82+ yaml : ${{steps.filter.outputs.yaml}}
83+ yaml_files : ${{steps.filter.outputs.yaml_files}}
8284 steps :
8385 # When invoked manually, use the given SHA to figure out the change list.
8486 - if : github.event_name == 'workflow_dispatch'
@@ -125,6 +127,10 @@ jobs:
125127 - '**/*.cc'
126128 - '**/*.h'
127129 - '**/*.proto'
130+ yaml:
131+ - added|modified:
132+ - '**/*.yaml'
133+ - '**/*.yml'
128134
129135 Setup :
130136 if : needs.Changes.outputs.python == 'true'
@@ -336,3 +342,27 @@ jobs:
336342 } >> "$GITHUB_STEP_SUMMARY"
337343 fi
338344 exit $exit_code
345+
346+ Yaml-lint :
347+ if : needs.Changes.outputs.yaml == 'true'
348+ name : YAML lint
349+ needs : Changes
350+ runs-on : ubuntu-24.04
351+ steps :
352+ - name : Check out a copy of the TFQ git repository
353+ uses : actions/checkout@v4
354+
355+ - name : Set up yamllint output problem matcher
356+ run : echo '::add-matcher::.github/problem-matchers/yamllint.json'
357+
358+ - name : Find out the yamllint version
359+ id : yamllint
360+ run : |
361+ version=$(yamllint --version)
362+ echo "version=${version#yamllint }" >> "$GITHUB_OUTPUT"
363+
364+ - name : Run yamllint ${{steps.yamllint.outputs.version}}
365+ run : |
366+ set -x
367+ # shellcheck disable=SC2086
368+ yamllint --format github ${{needs.Changes.outputs.yaml_files}}
You can’t perform that action at this time.
0 commit comments