Update guardrails.yml
This commit is contained in:
25
.github/workflows/guardrails.yml
vendored
25
.github/workflows/guardrails.yml
vendored
@@ -28,7 +28,7 @@
|
|||||||
# NOTE: Secrets are never printed. This workflow only verifies presence and emits an audit JSON report.
|
# 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:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -241,9 +241,30 @@ jobs:
|
|||||||
echo "```"
|
echo "```"
|
||||||
} >> "${GITHUB_STEP_SUMMARY}"
|
} >> "${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.
|
# Fail the workflow if required items are missing.
|
||||||
if [ "${#missing[@]}" -gt 0 ] || [ "${#missing_files[@]}" -gt 0 ]; then
|
if [ "${#missing[@]}" -gt 0 ] || [ "${#missing_files[@]}" -gt 0 ]; then
|
||||||
echo "ERROR: Config guardrails failed. Missing required configuration or script files." >> "${GITHUB_STEP_SUMMARY}"
|
echo "ERROR: Config guardrails failed. Missing required configuration or script files." >> "${GITHUB_STEP_SUMMARY}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user