Skip to content

Commit 54e9469

Browse files
committed
QHelp preview: run if paths.txt is non-empty
1 parent 8077a49 commit 54e9469

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/qhelp-pr-preview.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ jobs:
3030
- uses: ./.github/actions/fetch-codeql
3131

3232
- name: QHelp preview
33-
if: ${{ steps.changes.outputs.qhelp_files }}
3433
run: |
35-
( echo "QHelp previews:";
36-
cat "${{ runner.temp }}/paths.txt" | while read path; do
37-
echo "<details> <summary>${path}</summary>"
38-
echo
39-
codeql generate query-help --format=markdown "${path}"
40-
echo "</details>"
41-
done) | gh pr comment "${{ github.event.pull_request.number }}" -F -
34+
if [ -s "${{ runner.temp }}/paths.txt" ]; then
35+
( echo "QHelp previews:";
36+
cat "${{ runner.temp }}/paths.txt" | while read path; do
37+
echo "<details> <summary>${path}</summary>"
38+
echo
39+
codeql generate query-help --format=markdown "${path}"
40+
echo "</details>"
41+
done) | gh pr comment "${{ github.event.pull_request.number }}" -F -
42+
fi
4243
env:
4344
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)