Skip to content

Commit f79dd93

Browse files
🩹 [Refactor]: Add super-linter summary generation on failure to improve error reporting
1 parent 4b980c8 commit f79dd93

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎.github/workflows/Build-Docs.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
}
9797
9898
- name: Lint documentation
99+
id: super-linter
99100
uses: super-linter/super-linter/slim@7bba2eeb89d01dc9bfd93c497477a57e72c83240 # v8.2.0
100101
env:
101102
FILTER_REGEX_INCLUDE: outputs/docs
@@ -113,3 +114,18 @@ jobs:
113114
VALIDATE_JSON_PRETTIER: false
114115
VALIDATE_MARKDOWN_PRETTIER: false
115116
VALIDATE_YAML_PRETTIER: false
117+
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: false
118+
SAVE_SUPER_LINTER_SUMMARY: true
119+
120+
- name: Post super-linter summary on failure
121+
if: steps.super-linter.outcome == 'failure'
122+
run: |
123+
Write-Host "Super-linter found issues. Generating summary..."
124+
$summaryPath = Join-Path $env:GITHUB_WORKSPACE 'super-linter-output' 'super-linter-summary.md'
125+
if (Test-Path $summaryPath) {
126+
Get-Content $summaryPath | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Encoding utf8 -Append
127+
} else {
128+
Write-Host "::warning::Super-linter failed but summary file not found at: $summaryPath"
129+
}
130+
Write-Host "::error::Super-linter found issues. Please review the summary above."
131+
exit 1

0 commit comments

Comments
 (0)