ci: fix empty file error in docs link check PR comment

The sticky-pull-request-comment action requires a non-empty file
when using the path input. When the filtered link checker finds no
broken links in changed files, it produces an empty file causing
the action to fail with "Either message or path input is required".

Ensure the results file always has content by writing a fallback
message when the file is missing or empty.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche
2026-02-10 21:50:38 -08:00
parent 2ec9937369
commit 93fd9d4bae
+3 -2
View File
@@ -256,8 +256,9 @@ jobs:
-i assets \
-u docs.px4.io/main/ \
> ./logs/filtered-link-check-results.md || true
else
echo "No changed doc files found" > ./logs/filtered-link-check-results.md
fi
if [ ! -s ./logs/filtered-link-check-results.md ]; then
echo "No broken links found in changed files." > ./logs/filtered-link-check-results.md
fi
cat ./logs/filtered-link-check-results.md