Backport markdown link checker improvements#3371
Merged
Merged
Conversation
* Replace deprecated URL checker action with maintained fork gaurav-nelson/github-action-markdown-link-check is explicitly deprecated and points to tcort/github-action-markdown-link-check as its successor. The new action is actively maintained by the upstream markdown-link-check package author and uses the same config file format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Test: add intentionally broken link to verify URL checker This broken link should trigger a failure in the URL checker workflow, confirming the new action correctly detects dead links. This commit should be reverted before merging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Debug: add verbose output and direct markdown-link-check test - Add a step that runs markdown-link-check directly (outside Docker) to see raw output and verify it detects the broken link - Disable quiet mode and enable verbose mode on the action step - This is a temporary debug commit to be reverted Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Replace Docker-based action with direct markdown-link-check invocation The tcort/github-action-markdown-link-check Docker action has a known bug (#553) where markdown-link-check silently fails inside the container, reporting all links as good without checking anything. This replaces the action with direct npm installation and invocation of markdown-link-check, which works correctly on the runner. Also fixes the PR modified-files detection by using fetch-depth: 0 for proper git diff. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove intentionally broken test link The URL checker has been verified to correctly detect broken links. Removing the test link added for debugging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Retry status-0 URL check failures with curl before failing The cr.yp.to links consistently fail with status 0 (connection failure) from GitHub Actions runners despite being valid URLs. - Increase markdown-link-check timeout from default 10s to 30s - Add a retry step that re-checks status-0 failures using curl with retries, so genuine dead links still fail but servers that don't respond to the Node.js HTTP client get a second chance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix pipefail: tee was swallowing markdown-link-check exit code Adding `| tee` to capture output caused the pipeline exit code to always be 0 (from tee), so link check failures were silently ignored. Adding `set -o pipefail` ensures the pipeline fails when markdown-link-check fails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Use continue-on-error so curl retry can rescue the job The `if: failure()` approach ran the retry step but couldn't change the job outcome. Using `continue-on-error: true` with step ID lets the retry step determine the final pass/fail result. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The backport excludes the unrelated JWT documentation change from #3368.