38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
name: Helm Diff Deployment
|
|
description: Diff a Helm chart for a deployment in a Kubernetes cluster
|
|
inputs:
|
|
DEPLOYMENT_NAME:
|
|
description: "The Kubernetes Deployment to update"
|
|
required: true
|
|
DEPLOYMENT_NAMESPACE:
|
|
description: "The Kubernetes namespace of the Deployment"
|
|
required: true
|
|
IMAGE_PATH:
|
|
description: "The registry path to the image"
|
|
required: true
|
|
IMAGE_TAG:
|
|
description: "The image tag to deploy"
|
|
required: true
|
|
CONTAINER_NAME:
|
|
description: "The container component to update"
|
|
required: true
|
|
VALUES_FILE:
|
|
description: "The values file to use"
|
|
default: "./helm/values.yaml"
|
|
CHART_PATH:
|
|
description: "Path to the Helm chart"
|
|
default: "./helm"
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install Helm Diff
|
|
shell: sh
|
|
run: |
|
|
helm plugin list | grep -q diff || helm plugin install https://github.com/databus23/helm-diff
|
|
- name: Helm Diff
|
|
shell: sh
|
|
run: |
|
|
CMD="helm diff upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAMESPACE }} --values ${{ inputs.VALUES_FILE }} --set deploy.${{ inputs.CONTAINER_NAME }}.tag=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }} --context 5"
|
|
echo "Running: $CMD"
|
|
eval "$CMD" |