File tree 5 files changed +156
-1
lines changed
5 files changed +156
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Markdown
2
+
3
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4
+ on :
5
+ push :
6
+ paths :
7
+ - " .github/workflows/check-markdown-task.yml"
8
+ - " .markdown-link-check.json"
9
+ - " Taskfile.yml"
10
+ - " **/.markdownlint*"
11
+ - " **.md"
12
+ - " **.mdx"
13
+ - " **.mkdn"
14
+ - " **.mdown"
15
+ - " **.markdown"
16
+ pull_request :
17
+ paths :
18
+ - " .github/workflows/check-markdown-task.yml"
19
+ - " .markdown-link-check.json"
20
+ - " Taskfile.yml"
21
+ - " **/.markdownlint*"
22
+ - " **.md"
23
+ - " **.mdx"
24
+ - " **.mkdn"
25
+ - " **.mdown"
26
+ - " **.markdown"
27
+ schedule :
28
+ # Run every Tuesday at 8 AM UTC to catch breakage caused by external changes.
29
+ - cron : " 0 8 * * TUE"
30
+ workflow_dispatch :
31
+ repository_dispatch :
32
+
33
+ jobs :
34
+ lint :
35
+ runs-on : ubuntu-latest
36
+
37
+ steps :
38
+ - name : Checkout repository
39
+ uses : actions/checkout@v2
40
+
41
+ - name : Initialize markdownlint-cli problem matcher
42
+ uses : xt0rted/markdownlint-problem-matcher@v1
43
+
44
+ - name : Install Taskfile
45
+ uses : arduino/actions/setup-taskfile@master
46
+ with :
47
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
48
+ version : 3.x
49
+
50
+ - name : Lint
51
+ run : task markdown:lint
52
+
53
+ links :
54
+ runs-on : ubuntu-latest
55
+
56
+ steps :
57
+ - name : Checkout repository
58
+ uses : actions/checkout@v2
59
+
60
+ - name : Install Taskfile
61
+ uses : arduino/actions/setup-taskfile@master
62
+ with :
63
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
64
+ version : 3.x
65
+
66
+ - name : Check links
67
+ run : task --silent markdown:check-links
Original file line number Diff line number Diff line change
1
+ {
2
+ "retryOn429" : true ,
3
+ "retryCount" : 3 ,
4
+ "aliveStatusCodes" : [200 , 206 ]
5
+ }
Original file line number Diff line number Diff line change
1
+ # See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
2
+ # Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment.
3
+
4
+ default : false
5
+ MD001 : false
6
+ MD002 : false
7
+ MD003 : false # Prettier
8
+ MD004 : false # Prettier
9
+ MD005 : false # Prettier
10
+ MD006 : false # Prettier
11
+ MD007 : false # Prettier
12
+ MD008 : false # Prettier
13
+ MD009 :
14
+ br_spaces : 0
15
+ strict : true
16
+ list_item_empty_lines : false # Prettier
17
+ MD010 : false # Prettier
18
+ MD011 : true
19
+ MD012 : false # Prettier
20
+ MD013 : false
21
+ MD014 : false
22
+ MD018 : true
23
+ MD019 : false # Prettier
24
+ MD020 : true
25
+ MD021 : false # Prettier
26
+ MD022 : false # Prettier
27
+ MD023 : false # Prettier
28
+ MD024 : false
29
+ MD025 :
30
+ level : 1
31
+ front_matter_title : ' ^\s*"?title"?\s*[:=]'
32
+ MD026 : false
33
+ MD027 : false # Prettier
34
+ MD028 : false
35
+ MD029 :
36
+ style : one
37
+ MD030 :
38
+ ul_single : 1
39
+ ol_single : 1
40
+ ul_multi : 1
41
+ ol_multi : 1
42
+ MD031 : false # Prettier
43
+ MD032 : false # Prettier
44
+ MD033 : false
45
+ MD034 : false
46
+ MD035 : false # Prettier
47
+ MD036 : false
48
+ MD037 : true
49
+ MD038 : true
50
+ MD039 : true
51
+ MD040 : false
52
+ MD041 : false
53
+ MD042 : true
54
+ MD043 : false
55
+ MD044 : false
56
+ MD045 : true
57
+ MD046 :
58
+ style : fenced
59
+ MD047 : false # Prettier
Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Check TypeScript status] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-typescript-task.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-typescript-task.yml )
4
4
[ ![ Check TypeScript Configuration status] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-tsconfig.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-tsconfig.yml )
5
+ [ ![ Check npm status] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-npm.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-npm.yml )
5
6
[ ![ Integration Tests status] ( https://github.com/arduino/setup-taskfile/actions/workflows/test-integration.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/test-integration.yml )
6
7
[ ![ Check Action Metadata status] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-action-metadata-task.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-action-metadata-task.yml )
7
- [ ![ Spell Check status] ( https://github.com/arduino/setup-taskfile/actions/workflows/spell-check.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/spell-check.yml )
8
+ [ ![ Check Markdown status] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-markdown-task.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-markdown-task.yml )
9
+ [ ![ Spell Check status] ( https://github.com/arduino/setup-taskfile/actions/workflows/spell-check-task.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/spell-check-task.yml )
8
10
[ ![ Check License status] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-license.yml/badge.svg )] ( https://github.com/arduino/setup-taskfile/actions/workflows/check-license.yml )
9
11
10
12
A [ GitHub Actions] ( https://docs.github.com/en/actions ) action that makes the [ Task] ( https://taskfile.dev/#/ ) task runner / build tool available to use in your workflow.
Original file line number Diff line number Diff line change 11
11
deps :
12
12
- task : ts:test
13
13
- task : action:validate
14
+ - task : markdown:lint
14
15
- task : general:check-spelling
15
16
16
17
ts:install-deps :
@@ -56,6 +57,27 @@ tasks:
56
57
- wget --quiet --output-document="{{.ACTION_METADATA_SCHEMA_PATH}}" https://json.schemastore.org/github-action
57
58
- npx ajv-cli validate --strict=false -s "{{.ACTION_METADATA_SCHEMA_PATH}}" -d "action.yml"
58
59
60
+ markdown:lint :
61
+ desc : Check for problems in Markdown files
62
+ cmds :
63
+ - npx markdownlint-cli "**/*.md"
64
+
65
+ markdown:check-links :
66
+ desc : Check for broken links
67
+ cmds :
68
+ - |
69
+ # NOTE: npx --call uses the native shell, so this task can't be used on Windows.
70
+ npx --package=markdown-link-check --call='
71
+ STATUS=0
72
+ for file in $(find -name "*.md"); do
73
+ markdown-link-check \
74
+ --quiet \
75
+ --config "./.markdown-link-check.json" \
76
+ "$file"
77
+ STATUS=$(( $STATUS + $? ))
78
+ done
79
+ exit $STATUS'
80
+
59
81
general:check-spelling :
60
82
desc : Check for commonly misspelled words
61
83
cmds :
You can’t perform that action at this time.
0 commit comments