File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed 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,9 @@ jobs:
125127 - '**/*.cc'
126128 - '**/*.h'
127129 - '**/*.proto'
130+ yaml:
131+ - added|modified:
132+ - '**/*.yaml'
128133
129134 Setup :
130135 if : needs.Changes.outputs.python == 'true'
@@ -336,3 +341,27 @@ jobs:
336341 } >> "$GITHUB_STEP_SUMMARY"
337342 fi
338343 exit $exit_code
344+
345+ Yaml-lint :
346+ if : needs.Changes.outputs.yaml == 'true'
347+ name : YAML lint
348+ needs : Changes
349+ runs-on : ubuntu-24.04
350+ steps :
351+ - name : Check out a copy of the TFQ git repository
352+ uses : actions/checkout@v4
353+
354+ - name : Set up yamllint output problem matcher
355+ run : echo '::add-matcher::.github/problem-matchers/yamllint.json'
356+
357+ - name : Find out the yamllint version
358+ id : yamllint
359+ run : |
360+ version=$(yamllint --version)
361+ echo "version=${version#yamllint }" >> "$GITHUB_OUTPUT"
362+
363+ - name : Run yamllint ${{steps.yamllint.outputs.version}}
364+ run : |
365+ set -x
366+ # shellcheck disable=SC2086
367+ yamllint --format github ${{needs.Changes.outputs.yaml_files}}
You can’t perform that action at this time.
0 commit comments