Skip to content

Commit 7befdad

Browse files
authored
Improve markdown check (#270)
* Improve markdown check * Rename jobs * Rename jobs
1 parent 43c5503 commit 7befdad

File tree

4 files changed

+44
-33
lines changed

4 files changed

+44
-33
lines changed

.github/workflows/check-markdown.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Check Markdown Format
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
branches: [main]
9+
10+
jobs:
11+
markdown-check-format:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
# Please, make sure to enable Markdown linting in your IDE. For the Visual Studio Code editor it is
18+
# `davidanson.vscode-markdownlint` that is already specified in the `.vscode/extensions.json` file.
19+
- run: |
20+
files=$(git diff --diff-filter=ACMRT --name-only origin/${{ github.event.repository.default_branch }}.. "*.md")
21+
if [ -n "$files" ]; then
22+
image=ghcr.io/igorshubovych/markdownlint-cli:sha256:c902fc97bb4ba50cd073408e664fe00414e6e2064f0c213bafd393ea17f3a0fd # v0.32.1
23+
docker run --rm -v $PWD:/workdir $image $files --disable MD013 MD033
24+
fi
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check Markdown Links
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
branches: [main]
9+
10+
jobs:
11+
markdown-check-links:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- uses: gaurav-nelson/github-action-markdown-link-check@9710f0fec812ce0a3b98bef4c9d842fc1f39d976 # 1.0.13
18+
with:
19+
use-quiet-mode: 'yes'

project.code-workspace

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@
129129
"editor.insertSpaces": true,
130130
"editor.tabSize": 2
131131
},
132-
"yaml.schemas": {
133-
"https://json.schemastore.org/github-workflow.json": "file://./.github/workflows/check-markdown.yml"
134-
},
135132
"workbench.colorCustomizations": {
136133
"activityBar.activeBackground": "#1accff",
137134
"activityBar.activeBorder": "#df00ad",
@@ -151,6 +148,6 @@
151148
"titleBar.inactiveBackground": "#00b3e699",
152149
"titleBar.inactiveForeground": "#15202b99"
153150
},
154-
"peacock.color": "#00b3e6",
151+
"peacock.color": "#00b3e6"
155152
}
156153
}

0 commit comments

Comments
 (0)