Skip to content

Commit 26cd626

Browse files
committed
Address code review
1 parent 4fe4b81 commit 26cd626

File tree

3 files changed

+63
-48
lines changed

3 files changed

+63
-48
lines changed

.github/workflows/check-links.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/check-links.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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; }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
}

0 commit comments

Comments
 (0)