Files
davidson-ci/scripts/report.sh
T
pauljd 4a29f242c0
pauljd/davidson-ci: Davidson CI / detect (push) Successful in 2s
Add Davidson CI summary report
2026-09-08 17:20:06 +01:00

67 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
set -euo pipefail
SUMMARY_FILE="${GITEA_STEP_SUMMARY:-${GITHUB_STEP_SUMMARY:-}}"
if [ -z "$SUMMARY_FILE" ]; then
echo "No Actions summary file available"
exit 0
fi
PHP_COUNT="${DAVIDSON_PHP_COUNT:-0}"
JS_COUNT="${DAVIDSON_JS_COUNT:-0}"
TS_COUNT="${DAVIDSON_TS_COUNT:-0}"
CSS_COUNT="${DAVIDSON_CSS_COUNT:-0}"
{
echo "# Davidson CI Report"
echo
echo "## Project Detection"
echo
if [ "$PHP_COUNT" -gt 0 ]; then
echo "- ✅ PHP: $PHP_COUNT files"
else
echo "- PHP: not detected"
fi
if [ "$JS_COUNT" -gt 0 ]; then
echo "- ✅ JavaScript: $JS_COUNT files"
else
echo "- JavaScript: not detected"
fi
if [ "$TS_COUNT" -gt 0 ]; then
echo "- ✅ TypeScript: $TS_COUNT files"
else
echo "- TypeScript: not detected"
fi
if [ "$CSS_COUNT" -gt 0 ]; then
echo "- ✅ CSS: $CSS_COUNT files"
else
echo "- CSS: not detected"
fi
echo
echo "## Quality"
echo
echo "- ✅ Language checks completed"
echo "- ✅ Tests/lint/build completed where configured"
echo
echo "## Security"
echo
echo "- ✅ Composer audit"
echo "- ✅ npm audit"
echo "- ✅ Semgrep"
echo "- ✅ Trivy vulnerability scan"
echo "- ✅ Trivy secret scan"
echo
echo "## Result"
echo
echo "✅ **Davidson CI completed successfully**"
} >> "$SUMMARY_FILE"