34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Helm Upgrade Deployment Image
|
|
description: Set the image for a deployment in a Kubernetes
|
|
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: Helm Set Image
|
|
shell: sh
|
|
run: |
|
|
CMD="helm 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 }}"
|
|
echo "Running: $CMD"
|
|
eval "$CMD" |