Retry markdown link check on failure
ADD
.github/scripts/markdown-link-check-with-retry.sh
+#!/bin/bash -e
+
+retry_count=3
+
+for file in "$@"; do
+ for i in $(seq 1 $retry_count); do
+ if markdown-link-check --config "$(dirname "$0")/markdown-link-check-config.json" \
+ "$file"; then
+ break
+ elif [[ $i -eq $retry_count ]]; then
+ exit 1
+ fi
+ sleep 5
+ done
+done

MODIFY
.github/workflows/reusable-markdown-link-check.yml
.github/workflows/reusable-markdown-link-check.yml
@@ -18,5 +18,4 @@ jobs:
-name '*.md' \
-not -path './CHANGELOG.md' \
-not -path './licenses/*' \
- | xargs markdown-link-check \
- --config .github/scripts/markdown-link-check-config.json
+ | xargs .github/scripts/markdown-link-check-with-retry.sh

Retry markdown link check on failure (#5853)