Skip to content

Commit 2dbd595

Browse files
authored
ci(lint): add linting workflow for markdown files (#83)
Signed-off-by: Gaius <gaius.qi@gmail.com>
1 parent 8279d8a commit 2dbd595

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v5
17+
with:
18+
fetch-depth: 1
19+
20+
- name: Get changed markdown files
21+
id: changed-files
22+
uses: tj-actions/changed-files@v44
23+
with:
24+
files: |
25+
**/*.md
26+
27+
- name: Markdown lint
28+
uses: docker://avtodev/markdown-lint:v1
29+
with:
30+
config: '.markdownlint.yml'
31+
args: '${{ steps.changed-files.outputs.all_changed_files }}'

.markdownlint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MD010: false
2+
MD013:
3+
line_length: 1024
4+
MD046:
5+
style: "fenced"

0 commit comments

Comments
 (0)