-
Notifications
You must be signed in to change notification settings - Fork 932
maint: Add ci workflow to check links #4432
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
Merged
+66
−0
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3589685
Add ci workflow to check links
apatniv f9d2001
Merge branch 'main' into add_link_verifier
apatniv 4fe4b81
Merge branch 'main' into add_link_verifier
apatniv f24f44c
Address code review
apatniv be63493
Add rst files as well
apatniv 414f858
Merge branch 'main' into add_link_verifier
apatniv 0325e39
Apply suggestion from @emdneto
emdneto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: check-links | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - '**/*.md' | ||
| - '**/*.rst' | ||
| - '.github/workflows/check-links.yml' | ||
| - '.github/workflows/check_links_config.json' | ||
| pull_request: | ||
| paths: | ||
| - '**/*.md' | ||
| - '**/*.rst' | ||
| - '.github/workflows/check-links.yml' | ||
| - '.github/workflows/check_links_config.json' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| check-links: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'otelbot[bot]' }} | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Get changed markdown files | ||
| id: changed-files | ||
| uses: tj-actions/changed-files@v46 | ||
| with: | ||
| files: | | ||
| **/*.md | ||
| **/*.rst | ||
|
|
||
| - name: Install markdown-link-check | ||
| if: steps.changed-files.outputs.any_changed == 'true' | ||
| run: npm install -g markdown-link-check@v3.12.2 | ||
|
|
||
| - name: Run markdown-link-check | ||
| if: steps.changed-files.outputs.any_changed == 'true' | ||
| run: | | ||
| markdown-link-check \ | ||
| --verbose \ | ||
| --config .github/workflows/check_links_config.json \ | ||
| ${{ steps.changed-files.outputs.all_changed_files }} \ | ||
| || { echo "Check that anchor links are lowercase"; exit 1; } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "ignorePatterns": [ | ||
| { | ||
| "pattern": "http(s)?://\\d+\\.\\d+\\.\\d+\\.\\d+" | ||
| }, | ||
| { | ||
| "pattern": "http(s)?://localhost" | ||
| }, | ||
| { | ||
| "pattern": "http(s)?://example.com" | ||
| } | ||
| ], | ||
| "aliveStatusCodes": [429, 200] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.