File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,18 @@ jobs:
2424 - name : Check README links
2525 id : check-links
2626 run : |
27- markdown-link-check README.md > link-check-results.txt || true
27+ markdown-link-check --verbose README.md > link-check-results.txt || true
28+ echo "::group::Link Check Results"
29+ cat link-check-results.txt
30+ echo "::endgroup::"
2831
2932 - name : Annotate Results
3033 run : |
31- if grep -q "ERROR" link-check-results.txt; then
32- echo "::error title=Broken Links Found::$(cat link-check-results.txt | sed 's/%/%25/g; s/\n/%0A/g; s/\r/%0D/g')"
34+ if grep -q "ERROR:" link-check-results.txt; then
35+ echo "::error title=Broken Links Found::$(cat link-check-results.txt | grep -B 2 'ERROR' | sed 's/%/%25/g; s/\n/%0A/g; s/\r/%0D/g')"
36+ echo "Broken Links:"
37+ cat link-check-results.txt | grep -B 2 'ERROR'
38+ exit 1
3339 else
3440 echo "::notice title=No Broken Links Found::All links are valid in the README."
3541 fi
You can’t perform that action at this time.
0 commit comments