Skip to content

Commit eb68086

Browse files
authored
fix: license-check might fail with no summary
Log:
1 parent 6399361 commit eb68086

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/license-check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
if [ "$HAS_ISSUES" = "true" ]; then
4444
echo "❌ REUSE lint failed with actual compliance issues"
4545
echo "lint_passed=false" >> $GITHUB_OUTPUT
46+
pipx run reuse==6.2.0 lint > reuse_lint_report.md 2>&1
4647
else
4748
echo "⚠️ REUSE lint failed but non_compliant fields are all empty (likely SPDX header parsing issues in reuse 6.x), treating as passed"
4849
echo "lint_passed=true" >> $GITHUB_OUTPUT
@@ -84,13 +85,14 @@ jobs:
8485
printf "## License & Copyright Check Report\n\n" >> $GITHUB_STEP_SUMMARY
8586
8687
# 1. 处理 REUSE lint 错误
87-
if [ "${{ steps.lcheck.outcome }}" != "success" ]; then
88+
if [ -f reuse_lint_report.md ]; then
8889
echo "### ❌ REUSE Compliance Check Failed" >> $GITHUB_STEP_SUMMARY
8990
echo "<details><summary>Click to view lint details</summary>" >> $GITHUB_STEP_SUMMARY
9091
echo -e "\n\`\`\`" >> $GITHUB_STEP_SUMMARY
91-
pipx run reuse==6.2.0 lint >> $GITHUB_STEP_SUMMARY || true
92+
cat reuse_lint_report.md >> $GITHUB_STEP_SUMMARY
9293
echo -e "\`\`\`\n" >> $GITHUB_STEP_SUMMARY
9394
echo "</details>" >> $GITHUB_STEP_SUMMARY
95+
cat reuse_lint_report.md
9496
fi
9597
9698
# 2. 处理年份检查错误

0 commit comments

Comments
 (0)