mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 16:27:35 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user