Skip to content

Commit b12f346

Browse files
authored
CI: Fix empty ok bot comment check (#681)
1 parent 867b32b commit b12f346

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ jobs:
269269
id: comment_file_check
270270
run: |
271271
FILE_PATH="pr.txt"
272-
if [ -s "$FILE_PATH" ]; then
272+
echo "===== pr.txt contents (debug) ====="
273+
sed -n '1,200p' "$FILE_PATH" || true
274+
echo "===== end debug ====="
275+
# Consider the file empty if it has zero bytes OR only whitespace/newlines.
276+
if [ -s "$FILE_PATH" ] && grep -q '[^[:space:]]' "$FILE_PATH"; then
273277
echo "file_empty=false" >> $GITHUB_OUTPUT
274278
else
275279
echo "file_empty=true" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)