File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : check-links
2+ on :
3+ push :
4+ branches : [ main ]
5+ paths :
6+ - ' **/*.md'
7+ - ' .github/workflows/check-links.yml'
8+ - ' .github/workflows/check_links_config.json'
9+ pull_request :
10+ paths :
11+ - ' **/*.md'
12+ - ' .github/workflows/check-links.yml'
13+ - ' .github/workflows/check_links_config.json'
14+
15+ permissions :
16+ contents : read
17+
18+ concurrency :
19+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
20+ cancel-in-progress : true
21+
22+ jobs :
23+ check-links :
24+ runs-on : ubuntu-latest
25+ if : ${{ github.actor != 'dependabot[bot]' && github.actor != 'otelbot[bot]' }}
26+ timeout-minutes : 15
27+ steps :
28+ - name : Checkout Repo
29+ uses : actions/checkout@v6
30+
31+ - name : Get changed markdown files
32+ id : changed-files
33+ uses : tj-actions/changed-files@v46
34+ with :
35+ files : |
36+ **/*.md
37+
38+ - name : Install markdown-link-check
39+ if : steps.changed-files.outputs.any_changed == 'true'
40+ run : npm install -g markdown-link-check@v3.12.2
41+
42+ - name : Run markdown-link-check
43+ if : steps.changed-files.outputs.any_changed == 'true'
44+ run : |
45+ markdown-link-check \
46+ --verbose \
47+ --config .github/workflows/check_links_config.json \
48+ ${{ steps.changed-files.outputs.all_changed_files }} \
49+ || { echo "Check that anchor links are lowercase"; exit 1; }
Original file line number Diff line number Diff line change 1+ {
2+ "ignorePatterns" : [
3+ {
4+ "pattern" : " http(s)?://\\ d+\\ .\\ d+\\ .\\ d+\\ .\\ d+"
5+ },
6+ {
7+ "pattern" : " http(s)?://localhost"
8+ },
9+ {
10+ "pattern" : " http(s)?://example.com"
11+ }
12+ ],
13+ "aliveStatusCodes" : [429 , 200 ]
14+ }
You can’t perform that action at this time.
0 commit comments