merge summary back in
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
name: "CI Summary"
|
||||
description: "Writes CI validation summary to GITHUB_STEP_SUMMARY"
|
||||
inputs:
|
||||
has_k8s:
|
||||
description: "Whether Kubernetes manifests were detected"
|
||||
required: true
|
||||
has_helmfile:
|
||||
description: "Whether helmfile.yaml was detected"
|
||||
required: true
|
||||
skip_helm_validation:
|
||||
description: "Whether Helm validation is manually disabled"
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "## CI Validation Summary" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
if [ "${{ inputs.has_k8s }}" = "true" ]; then
|
||||
echo "✅ **Kubernetes validation**: Completed" >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "❌ **Kubernetes validation**: Skipped (no k8s/ directory found)" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.has_helmfile }}" = "true" ] && [ "${{ inputs.skip_helm_validation }}" != "true" ]; then
|
||||
echo "✅ **Helm validation**: Completed" >> "$GITHUB_STEP_SUMMARY"
|
||||
elif [ "${{ inputs.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"
|
||||
if [ "${{ inputs.has_helmfile }}" = "true" ]; then
|
||||
service_type="Helm + Kubernetes"
|
||||
else
|
||||
service_type="Kubernetes Only"
|
||||
fi
|
||||
echo "**Service Type**: ${service_type}" >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -1,41 +0,0 @@
|
||||
name: "Deployment Summary"
|
||||
description: "Writes deployment summary to GITHUB_STEP_SUMMARY"
|
||||
inputs:
|
||||
has_k8s:
|
||||
description: "Whether Kubernetes manifests were detected"
|
||||
required: true
|
||||
has_helmfile:
|
||||
description: "Whether helmfile.yaml was detected"
|
||||
required: true
|
||||
skip_helm_deployment:
|
||||
description: "Whether Helm deployment is manually disabled"
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
echo "## Deployment Summary" >> "$GITHUB_STEP_SUMMARY"
|
||||
echo "" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
if [ "${{ inputs.has_k8s }}" = "true" ]; then
|
||||
echo "✅ **Kubernetes deployment**: Completed" >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "❌ **Kubernetes deployment**: Skipped (no k8s/ directory found)" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.has_helmfile }}" = "true" ] && [ "${{ inputs.skip_helm_deployment }}" != "true" ]; then
|
||||
echo "✅ **Helm deployment**: Completed" >> "$GITHUB_STEP_SUMMARY"
|
||||
elif [ "${{ inputs.has_helmfile }}" = "true" ] && [ "${{ inputs.skip_helm_deployment }}" = "true" ]; then
|
||||
echo "⏭️ **Helm deployment**: Skipped (manually disabled)" >> "$GITHUB_STEP_SUMMARY"
|
||||
else
|
||||
echo "⏭️ **Helm deployment**: Skipped (no helmfile.yaml found)" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
echo "" >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ "${{ inputs.has_helmfile }}" = "true" ]; then
|
||||
service_type="Helm + Kubernetes"
|
||||
else
|
||||
service_type="Kubernetes Only"
|
||||
fi
|
||||
echo "**Service Type**: ${service_type}" >> "$GITHUB_STEP_SUMMARY"
|
||||
@@ -28,19 +28,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_deployment:
|
||||
description: "Whether Helm deployment was manually skipped"
|
||||
value: ${{ jobs.summary-data.outputs.skip_helm_deployment }}
|
||||
service_type:
|
||||
description: "Service type inferred from repository contents"
|
||||
value: ${{ jobs.summary-data.outputs.service_type }}
|
||||
|
||||
jobs:
|
||||
detect-service-type:
|
||||
@@ -139,30 +126,30 @@ jobs:
|
||||
helmfile-args: apply
|
||||
env: ${{ fromJSON(inputs.helmfile_env) }}
|
||||
|
||||
summary-data:
|
||||
# Summary job that always runs to show what was deployed
|
||||
deployment-summary:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [detect-service-type, deploy-k8s, deploy-helm]
|
||||
if: always()
|
||||
outputs:
|
||||
has_k8s: ${{ steps.export.outputs.has_k8s }}
|
||||
has_helmfile: ${{ steps.export.outputs.has_helmfile }}
|
||||
skip_helm_deployment: ${{ steps.export.outputs.skip_helm_deployment }}
|
||||
service_type: ${{ steps.export.outputs.service_type }}
|
||||
steps:
|
||||
- name: Export summary data
|
||||
id: export
|
||||
- name: Deployment Summary
|
||||
run: |
|
||||
has_k8s="${{ needs.detect-service-type.outputs.has_k8s }}"
|
||||
has_helmfile="${{ needs.detect-service-type.outputs.has_helmfile }}"
|
||||
skip_helm_deployment="${{ inputs.skip_helm_deployment }}"
|
||||
echo "## Deployment 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 deployment**: Completed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
service_type="Kubernetes Only"
|
||||
echo "❌ **Kubernetes deployment**: 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_deployment=$skip_helm_deployment" >> "$GITHUB_OUTPUT"
|
||||
echo "service_type=$service_type" >> "$GITHUB_OUTPUT"
|
||||
if [ "${{ needs.detect-service-type.outputs.has_helmfile }}" == "true" ] && [ "${{ inputs.skip_helm_deployment }}" != "true" ]; then
|
||||
echo "✅ **Helm deployment**: Completed" >> $GITHUB_STEP_SUMMARY
|
||||
elif [ "${{ needs.detect-service-type.outputs.has_helmfile }}" == "true" ] && [ "${{ inputs.skip_helm_deployment }}" == "true" ]; then
|
||||
echo "⏭️ **Helm deployment**: Skipped (manually disabled)" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "⏭️ **Helm deployment**: 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
|
||||
|
||||
@@ -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