diff --git a/.github/workflows/guardrails.yml b/.github/workflows/guardrails.yml index c9b5559..9413735 100644 --- a/.github/workflows/guardrails.yml +++ b/.github/workflows/guardrails.yml @@ -28,7 +28,7 @@ # NOTE: Secrets are never printed. This workflow only verifies presence and emits an audit JSON report. # ============================================================================ -name: Config Guardrails (secrets and vars) +name: Guardrails on: workflow_dispatch: @@ -241,9 +241,30 @@ jobs: echo "```" } >> "${GITHUB_STEP_SUMMARY}" + # Human-readable missing items (in addition to JSON) + if [ "${#missing[@]}" -gt 0 ]; then + echo "### Missing required configuration" >> "${GITHUB_STEP_SUMMARY}" + for m in "${missing[@]}"; do + echo "- ${m}" >> "${GITHUB_STEP_SUMMARY}" + done + fi + + if [ "${#missing_optional[@]}" -gt 0 ]; then + echo "### Missing optional configuration" >> "${GITHUB_STEP_SUMMARY}" + for m in "${missing_optional[@]}"; do + echo "- ${m}" >> "${GITHUB_STEP_SUMMARY}" + done + fi + + if [ "${#missing_files[@]}" -gt 0 ]; then + echo "### Missing script files" >> "${GITHUB_STEP_SUMMARY}" + for m in "${missing_files[@]}"; do + echo "- ${m}" >> "${GITHUB_STEP_SUMMARY}" + done + fi + # Fail the workflow if required items are missing. if [ "${#missing[@]}" -gt 0 ] || [ "${#missing_files[@]}" -gt 0 ]; then echo "ERROR: Config guardrails failed. Missing required configuration or script files." >> "${GITHUB_STEP_SUMMARY}" exit 1 fi - fi