Skip to content

Commit d52478e

Browse files
Filter Super-Linter to generated Markdown
Use filesystem discovery without a default branch and limit documentation linting to Markdown files. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 04fff16 commit d52478e

1 file changed

Lines changed: 35 additions & 4 deletions

File tree

.github/workflows/Build-Docs.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,38 @@ jobs:
7878
}
7979
8080
- name: Lint documentation
81-
uses: DavidAnson/markdownlint-cli2-action@83c6b49590003d85b71ea0e478b36aa0a9bb3cd4 # main
82-
with:
83-
config: .github/linters/.markdown-lint.yml
84-
globs: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/docs/**/*.{md,markdown}
81+
id: super-linter
82+
uses: super-linter/super-linter/slim@4ce20838b8ab83717e78138c5b3a1407148e0918 # v8.7.0
83+
env:
84+
RUN_LOCAL: true
85+
DEFAULT_WORKSPACE: ${{ fromJson(inputs.Settings).WorkingDirectory }}
86+
FILTER_REGEX_INCLUDE: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/docs/.*\.(md|markdown)$
87+
ENABLE_GITHUB_ACTIONS_GROUP_TITLE: true
88+
GITHUB_TOKEN: ${{ github.token }}
89+
VALIDATE_ALL_CODEBASE: true
90+
VALIDATE_BIOME_FORMAT: false
91+
VALIDATE_BIOME_LINT: false
92+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
93+
VALIDATE_GITLEAKS: false
94+
VALIDATE_JSCPD: false
95+
VALIDATE_JSON_PRETTIER: false
96+
VALIDATE_MARKDOWN_PRETTIER: false
97+
VALIDATE_YAML_PRETTIER: false
98+
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
99+
USE_FIND_ALGORITHM: true
100+
SAVE_SUPER_LINTER_SUMMARY: true
101+
102+
- name: Post super-linter summary
103+
if: failure() || fromJson(inputs.Settings).Build.Docs.ShowSummaryOnSuccess == true
104+
shell: pwsh
105+
env:
106+
SUPER_LINTER_OUTCOME: ${{ steps.super-linter.outcome }}
107+
run: |
108+
$summaryPath = Join-Path $env:GITHUB_WORKSPACE 'super-linter-output' 'super-linter-summary.md'
109+
Get-Content $summaryPath | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8
110+
111+
$failed = $env:SUPER_LINTER_OUTCOME -eq 'failure'
112+
if ($failed) {
113+
Write-Host "::error::Super-linter found issues. Please review the summary above."
114+
exit 1
115+
}

0 commit comments

Comments
 (0)