File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,18 +37,28 @@ jobs:
3737
3838 - name : QHelp preview
3939 run : |
40+ EXIT_CODE=0
4041 echo "QHelp previews:" > comment.txt
41- cat "${{ runner.temp }}/paths.txt" | while read path; do
42+ while read path; do
4243 if [ ! -f "${path}" ]; then
4344 exit 1
4445 fi
4546 echo "<details> <summary>${path}</summary>"
4647 echo
47- codeql generate query-help --format=markdown -- "./${path}"
48+ codeql generate query-help --format=markdown -- "./${path}" 2> errors.txt || EXIT_CODE="$?"
49+ if [ -s errors.txt ]; then
50+ echo "# errors/warnings:"
51+ echo '```'
52+ cat errors.txt
53+ cat errors.txt 1>&2
54+ echo '```'
55+ fi
4856 echo "</details>"
49- done >> comment.txt
57+ done < "${{ runner.temp }}/paths.txt" >> comment.txt
58+ exit "${EXIT_CODE}"
5059
51- - uses : actions/upload-artifact@v2
60+ - if : always()
61+ uses : actions/upload-artifact@v2
5262 with :
5363 name : comment
5464 path : comment.txt
You can’t perform that action at this time.
0 commit comments