File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7878 }
7979
8080 - name : Lint documentation
81- uses : DavidAnson/markdownlint-cli2-action@28a7e8bdb81fd8ad675883de92c758ab78e0ce10 # v24
81+ id : markdownlint
82+ uses : DavidAnson/markdownlint-cli2-action@21c1be1b93ad9ed58fa840aacc3f279cde2a72ff # v24.2.0
8283 with :
8384 config : .github/linters/.markdown-lint.yml
8485 globs : ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/docs/**/*.md
86+
87+ - name : Summarize documentation lint
88+ if : always()
89+ shell : pwsh
90+ env :
91+ LINT_OUTCOME : ${{ steps.markdownlint.outcome }}
92+ WORKING_DIRECTORY : ${{ fromJson(inputs.Settings).WorkingDirectory }}
93+ run : |
94+ $docsPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "$env:WORKING_DIRECTORY/outputs/docs"
95+ $fileCount = if (Test-Path -Path $docsPath) {
96+ @(Get-ChildItem -Path $docsPath -Recurse -File -Include '*.md', '*.markdown').Count
97+ } else {
98+ 0
99+ }
100+
101+ @(
102+ '## Documentation lint'
103+ ''
104+ '- Tool: `markdownlint-cli2-action v24.2.0`'
105+ '- Configuration: `.github/linters/.markdown-lint.yml`'
106+ "- Files checked: $fileCount"
107+ "- Result: **$env:LINT_OUTCOME**"
108+ ) | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
You can’t perform that action at this time.
0 commit comments