File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Check ToC
2
+
3
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4
+ on :
5
+ push :
6
+ paths :
7
+ - " .github/workflows/check-toc.ya?ml"
8
+ - " README.md"
9
+ pull_request :
10
+ paths :
11
+ - " .github/workflows/check-toc.ya?ml"
12
+ - " README.md"
13
+ workflow_dispatch :
14
+ repository_dispatch :
15
+
16
+ jobs :
17
+ check :
18
+ name : ${{ matrix.file.name }}
19
+ runs-on : ubuntu-latest
20
+
21
+ strategy :
22
+ fail-fast : false
23
+
24
+ matrix :
25
+ file :
26
+ - name : README.md
27
+ # Max ToC depth, for use with the markdown-toc --maxdepth flag.
28
+ maxdepth : 3
29
+
30
+ steps :
31
+ - name : Checkout repository
32
+ uses : actions/checkout@v2
33
+
34
+ - name : Install markdown-toc
35
+ run : sudo npm install --global markdown-toc
36
+
37
+ - name : Rebuild ToC
38
+ run : |
39
+ markdown-toc \
40
+ --bullets=- \
41
+ --maxdepth=${{ matrix.file.maxdepth }} \
42
+ -i \
43
+ "${{ github.workspace }}/${{ matrix.file.name }}"
44
+
45
+ - name : Check ToC
46
+ run : git diff --color --exit-code
Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ projects:
20
20
- [ ` path ` ] ( #path )
21
21
- [ ` version ` ] ( #version )
22
22
- [ ` compliance ` ] ( #compliance )
23
- - [ ` format ` ] ( #format )
24
23
- [ ` library-manager ` ] ( #library-manager )
25
24
- [ ` project-type ` ] ( #project-type )
26
25
- [ ` recursive ` ] ( #recursive )
27
26
- [ ` report-file ` ] ( #report-file )
27
+ - [ ` verbose ` ] ( #verbose )
28
28
- [ ` token ` ] ( #token )
29
29
- [ Usage] ( #usage )
30
+ - [ Contributing] ( #contributing )
30
31
31
32
<!-- tocstop -->
32
33
You can’t perform that action at this time.
0 commit comments