File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -37,18 +37,28 @@ jobs:
37
37
38
38
- name : QHelp preview
39
39
run : |
40
+ EXIT_CODE=0
40
41
echo "QHelp previews:" > comment.txt
41
- cat "${{ runner.temp }}/paths.txt" | while read path; do
42
+ while read path; do
42
43
if [ ! -f "${path}" ]; then
43
44
exit 1
44
45
fi
45
46
echo "<details> <summary>${path}</summary>"
46
47
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
48
56
echo "</details>"
49
- done >> comment.txt
57
+ done < "${{ runner.temp }}/paths.txt" >> comment.txt
58
+ exit "${EXIT_CODE}"
50
59
51
- - uses : actions/upload-artifact@v2
60
+ - if : always()
61
+ uses : actions/upload-artifact@v2
52
62
with :
53
63
name : comment
54
64
path : comment.txt
You can’t perform that action at this time.
0 commit comments