Skip to content

Commit 6feb109

Browse files
committed
Migrate markdown link checks to local npm script
1 parent 24f8d46 commit 6feb109

2 files changed

Lines changed: 21 additions & 23 deletions

File tree

.github/workflows/markdown.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
check-links:
4646
name: Check Markdown Links
4747
runs-on: ubuntu-latest
48+
permissions:
49+
packages: read
4850
steps:
4951
- name: Harden the runner (Audit all outbound calls)
5052
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
@@ -53,9 +55,18 @@ jobs:
5355

5456
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5557

56-
- name: Check Links
57-
uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 # v1.1.2
58+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
59+
env:
60+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5861
with:
59-
use-quiet-mode: 'no'
60-
use-verbose-mode: 'yes'
61-
config-file: '.github/markdown-link-check.jsonc'
62+
node-version-file: package.json
63+
registry-url: https://npm.pkg.github.com
64+
package-manager-cache: false
65+
66+
- name: Install dependencies
67+
env:
68+
GITHUB_TOKEN: ${{ github.token }}
69+
run: npm ci
70+
71+
- name: Check Links
72+
run: npm run check:links

.github/workflows/nightly.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,6 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
check-links:
17-
name: Check Markdown Links
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Harden the runner (Audit all outbound calls)
21-
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
22-
with:
23-
egress-policy: audit
24-
25-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26-
27-
- name: Check Links
28-
uses: tcort/github-action-markdown-link-check@e7c7a18363c842693fadde5d41a3bd3573a7a225 # v1.1.2
29-
with:
30-
use-quiet-mode: 'no'
31-
use-verbose-mode: 'yes'
32-
config-file: '.github/markdown-link-check.jsonc'
33-
3416
build:
3517
if: github.repository == 'Open-CMSIS-Pack/vscode-cmsis-debugger'
3618
strategy:
@@ -102,7 +84,12 @@ jobs:
10284
if: runner.os == 'Linux'
10385
run: npm run build
10486

87+
- name: Check Links
88+
if: runner.os == 'Linux'
89+
run: npm run check:links
90+
10591
- name: Check copyright
92+
if: runner.os == 'Linux'
10693
run: npm run copyright:check
10794

10895
- name: Test

0 commit comments

Comments
 (0)