37 lines
1.2 KiB
YAML
37 lines
1.2 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"
|
|
TAG_KEY:
|
|
description: "Helm --set key for the image tag (e.g. deploy.api.tag)"
|
|
required: true
|
|
|
|
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 ${TAG_KEY}=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }}"
|
|
echo "Running: $CMD"
|
|
eval "$CMD" |