externalize summary

This commit is contained in:
2026-04-29 18:36:38 +02:00
parent c40148a3e1
commit c306e1db1a
6 changed files with 144 additions and 74 deletions
+41
View File
@@ -0,0 +1,41 @@
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"
@@ -0,0 +1,41 @@
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"
@@ -1,19 +0,0 @@
name: Extract chart name from repo name
description: Extracts the chart name from the repo name, based on the convention of helm-<chart-name>
inputs:
repo:
description: The full repository name (e.g., "helm-my-chart")
required: true
outputs:
chart-name:
description: The extracted chart name
value: ${{ steps.extract.outputs.suffix }}
runs:
using: "composite"
steps:
- id: extract
shell: bash
run: |
full_repo="${{ inputs.repo }}"
suffix="${full_repo##*helm-}"
echo "suffix=$suffix" >> $GITHUB_OUTPUT
@@ -1,19 +0,0 @@
name: "Extract namespace from repo name"
description: "Extracts the namespace name from the repo name, based on the convention of k_<namespace-name>"
inputs:
repo:
description: 'The repo name, get it from "github.repository"'
required: true
outputs:
namespace:
description: "The namespace name"
value: ${{ steps.extract.outputs.suffix }}
runs:
using: "composite"
steps:
- id: extract
shell: bash
run: |
full_repo="${{ inputs.repo }}"
suffix="${full_repo##*k_}"
echo "suffix=$suffix" >> $GITHUB_OUTPUT