Skip to content

Commit 99057e4

Browse files
committed
feat: add GH action markdown linting for spec file
1 parent d02cff6 commit 99057e4

File tree

6 files changed

+532
-46
lines changed

6 files changed

+532
-46
lines changed
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: validate-markdown
22

3-
# Author: @MikeRalphson
4-
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/2130
3+
# Author: @ralfhandl based on work of @MikeRalphson
4+
# Issue: https://github.com/OAI/Overlay-Specification/issues/53
55

66
#
7-
# This workflow validates files in the versions directory matching 1.*.md
7+
# This workflow validates markdown files in the versions directory matching *.md
88
#
99

1010
# run this on push to any branch and creation of pull-requests
@@ -16,10 +16,16 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v2 # checkout repo content
20-
- uses: actions/setup-node@v1 # setup Node.js
19+
- uses: actions/checkout@v4 # checkout repo content
2120
with:
22-
node-version: '18.x'
21+
fetch-depth: 0
22+
# - name: use the javascript environment from main
23+
# run: |
24+
# git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml
25+
- uses: actions/setup-node@v4 # setup Node.js
26+
with:
27+
node-version: '20.x'
2328
- name: Validate markdown
24-
run: npx mdv versions/1.*.md
25-
29+
run: npx --yes mdv versions/*.md
30+
- name: Lint markdown
31+
run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/*.md

.markdownlint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Unordered list indentation
2+
MD007:
3+
indent: 2
4+
5+
MD012: false # allow blank lines
6+
7+
MD013:
8+
line_length: 800
9+
tables: false
10+
11+
MD024: false # duplicate headings
12+
MD033: false # inline HTML

0 commit comments

Comments
 (0)