merge summary back in

This commit is contained in:
2026-04-29 19:39:22 +02:00
parent c306e1db1a
commit 1c26064357
4 changed files with 36 additions and 144 deletions
+18 -31
View File
@@ -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