Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link checker now runs with reported failures if a markdown changes or on nightly channel #7888

Merged
merged 5 commits into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,25 @@ jobs:

# ---------------------------------------------------------------------------

markdown-paths-filter:
runs-on: ubuntu-latest
outputs:
md_changes: ${{ steps.filter.outputs.md_changes }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
md_changes:
- '**/*.md'

link-checker:
name: Check links
needs: markdown-paths-filter
if: inputs.CHANNEL == 'nightly' || needs.markdown-paths-filter.outputs.md_changes == 'true'
runs-on: ubuntu-latest
# do not fail entire workflow (e.g. nightly) if this is the only failing check
continue-on-error: true
Expand All @@ -174,7 +191,7 @@ jobs:
id: lychee
uses: lycheeverse/[email protected]
with:
fail: ${{ inputs.CHANNEL == 'nightly' }}
fail: true
lycheeVersion: "0.15.1"
# When given a directory, lychee checks only markdown, html and text files, everything else we have to glob in manually.
# Pass --verbose, so that all considered links are printed, making it easier to debug.
Expand Down
Loading