-
Notifications
You must be signed in to change notification settings - Fork 54
37 lines (32 loc) · 999 Bytes
/
check_links.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Check Links
on:
pull_request:
branches:
- master
- main
workflow_dispatch:
jobs:
generate-matrix:
name: Find markdown files to check
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/[email protected]
- id: set-matrix
run: |
set -x
echo "matrix=$(find "$(pwd)" -type f -iname \*.md | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
check:
runs-on: ubuntu-latest
needs: [generate-matrix]
strategy:
fail-fast: false
matrix:
file_to_check: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Install markdown-link-check
run: sudo npm install -g markdown-link-check
- uses: actions/[email protected]
- name: Run markdown-link-check against *.md files
run: markdown-link-check --config "$(pwd)/.markdown-link-check.json" --verbose --quiet "${{ matrix.file_to_check }}"