-
Notifications
You must be signed in to change notification settings - Fork 37
51 lines (49 loc) · 1.37 KB
/
markdown.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: markdown
on:
push:
branches:
- main
pull_request:
jobs:
changedfiles:
name: changed files
runs-on: ubuntu-latest
outputs:
md: ${{ steps.changes.outputs.md }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changes
run: |
echo "md=$(git diff --name-only --diff-filter=ACMRTUXB origin/${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.sha }} | grep .md$ | xargs)" >> $GITHUB_OUTPUT
lint:
name: lint markdown files
runs-on: ubuntu-latest
needs: changedfiles
if: ${{needs.changedfiles.outputs.md}}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Run linter
uses: docker://avtodev/markdown-lint:v1
with:
args: -i "/**/testdata" ${{needs.changedfiles.outputs.md}}
ignore: 'CHANGELOG.md'
check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
base-branch: 'main'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.markdown-link.json'
check-modified-files-only: 'yes'
folder-path: ''