merge summary back in
This commit is contained in:
@@ -23,19 +23,6 @@ on:
|
||||
required: false
|
||||
default: "{}"
|
||||
type: string
|
||||
outputs:
|
||||
has_k8s:
|
||||
description: "Whether Kubernetes manifests were detected"
|
||||
value: ${{ jobs.summary-data.outputs.has_k8s }}
|
||||
has_helmfile:
|
||||
description: "Whether helmfile.yaml was detected"
|
||||
value: ${{ jobs.summary-data.outputs.has_helmfile }}
|
||||
skip_helm_validation:
|
||||
description: "Whether Helm validation was manually skipped"
|
||||
value: ${{ jobs.summary-data.outputs.skip_helm_validation }}
|
||||
service_type:
|
||||
description: "Service type inferred from repository contents"
|
||||
value: ${{ jobs.summary-data.outputs.service_type }}
|
||||
|
||||
jobs:
|
||||
detect-service-type:
|
||||
@@ -113,30 +100,30 @@ jobs:
|
||||
helmfile-args: diff
|
||||
env: ${{ fromJSON(inputs.helmfile_env) }}
|
||||
|
||||
summary-data:
|
||||
# Summary job that always runs to show what was validated
|
||||
ci-summary:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [detect-service-type, validate-k8s, validate-helm]
|
||||
if: always()
|
||||
outputs:
|
||||
has_k8s: ${{ steps.export.outputs.has_k8s }}
|
||||
has_helmfile: ${{ steps.export.outputs.has_helmfile }}
|
||||
skip_helm_validation: ${{ steps.export.outputs.skip_helm_validation }}
|
||||
service_type: ${{ steps.export.outputs.service_type }}
|
||||
steps:
|
||||
- name: Export summary data
|
||||
id: export
|
||||
- name: CI Summary
|
||||
run: |
|
||||
has_k8s="${{ needs.detect-service-type.outputs.has_k8s }}"
|
||||
has_helmfile="${{ needs.detect-service-type.outputs.has_helmfile }}"
|
||||
skip_helm_validation="${{ inputs.skip_helm_validation }}"
|
||||
echo "## CI Validation Summary" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [ "$has_helmfile" = "true" ]; then
|
||||
service_type="Helm + Kubernetes"
|
||||
if [ "${{ needs.detect-service-type.outputs.has_k8s }}" == "true" ]; then
|
||||
echo "✅ **Kubernetes validation**: Completed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
service_type="Kubernetes Only"
|
||||
echo "❌ **Kubernetes validation**: Skipped (no k8s/ directory found)" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo "has_k8s=$has_k8s" >> "$GITHUB_OUTPUT"
|
||||
echo "has_helmfile=$has_helmfile" >> "$GITHUB_OUTPUT"
|
||||
echo "skip_helm_validation=$skip_helm_validation" >> "$GITHUB_OUTPUT"
|
||||
echo "service_type=$service_type" >> "$GITHUB_OUTPUT"
|
||||
if [ "${{ needs.detect-service-type.outputs.has_helmfile }}" == "true" ] && [ "${{ inputs.skip_helm_validation }}" != "true" ]; then
|
||||
echo "✅ **Helm validation**: Completed" >> $GITHUB_STEP_SUMMARY
|
||||
elif [ "${{ needs.detect-service-type.outputs.has_helmfile }}" == "true" ] && [ "${{ inputs.skip_helm_validation }}" == "true" ]; then
|
||||
echo "⏭️ **Helm validation**: Skipped (manually disabled)" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "⏭️ **Helm validation**: Skipped (no helmfile.yaml found)" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Service Type**: ${{ needs.detect-service-type.outputs.has_helmfile == 'true' && 'Helm + Kubernetes' || 'Kubernetes Only' }}" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
Reference in New Issue
Block a user