add chart paths for helm actions
This commit is contained in:
@@ -17,6 +17,7 @@ Diff a Helm chart for a deployment in a Kubernetes cluster
|
||||
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||
| `CONTAINER_NAME` | <p>The container component to update</p> | `true` | `""` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
|
||||
@@ -19,6 +19,9 @@ inputs:
|
||||
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
|
||||
@@ -30,6 +33,6 @@ runs:
|
||||
- name: Helm Diff
|
||||
shell: sh
|
||||
run: |
|
||||
CMD="helm diff upgrade ${{ inputs.DEPLOYMENT_NAME }} ./helm -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"
|
||||
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"
|
||||
@@ -17,6 +17,7 @@ Set the image for a deployment in a Kubernetes
|
||||
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||
| `CONTAINER_NAME` | <p>The container component to update</p> | `true` | `""` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
|
||||
@@ -19,6 +19,9 @@ inputs:
|
||||
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
|
||||
@@ -26,6 +29,6 @@ runs:
|
||||
- name: Helm Set Image
|
||||
shell: sh
|
||||
run: |
|
||||
CMD="helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ./helm -n ${{ inputs.DEPLOYMENT_NAMESPACE }} --values ${{ inputs.VALUES_FILE }} --set deploy.${{ inputs.CONTAINER_NAME }}.tag=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }}"
|
||||
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"
|
||||
@@ -17,6 +17,7 @@ Template a Helm chart for a deployment in a Kubernetes cluster
|
||||
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||
| `CONTAINER_NAME` | <p>The container component to update</p> | `true` | `""` |
|
||||
| `VALUES_FILE` | <p>The values file to use</p> | `false` | `./helm/values.yaml` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `./helm` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
|
||||
@@ -19,6 +19,9 @@ inputs:
|
||||
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
|
||||
@@ -26,6 +29,6 @@ runs:
|
||||
- name: Helm Template
|
||||
shell: sh
|
||||
run: |
|
||||
CMD="helm template ${{ inputs.DEPLOYMENT_NAME }} ./helm -n ${{ inputs.DEPLOYMENT_NAMESPACE }} --values ${{ inputs.VALUES_FILE }} --set deploy.${{ inputs.CONTAINER_NAME }}.tag=${{ inputs.IMAGE_TAG }} --set image.repository=${{ inputs.IMAGE_PATH }}"
|
||||
CMD="helm template ${{ 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"
|
||||
@@ -15,6 +15,8 @@ Login to an OCI registry, update chart dependencies, and run helm upgrade for th
|
||||
| `REGISTRY` | <p>OCI registry hostname for helm dependency login</p> | `true` | `""` |
|
||||
| `REGISTRY_USERNAME` | <p>Username for OCI registry login</p> | `true` | `""` |
|
||||
| `REGISTRY_TOKEN` | <p>Token for OCI registry login</p> | `true` | `""` |
|
||||
| `CHART_PATH` | <p>Path to the Helm chart</p> | `false` | `.` |
|
||||
| `VALUES_FILE` | <p>Path to a values file (optional)</p> | `false` | `""` |
|
||||
<!-- action-docs-inputs source="action.yml" -->
|
||||
|
||||
<!-- action-docs-runs source="action.yml" -->
|
||||
|
||||
@@ -13,6 +13,12 @@ inputs:
|
||||
REGISTRY_TOKEN:
|
||||
description: "Token for OCI registry login"
|
||||
required: true
|
||||
CHART_PATH:
|
||||
description: "Path to the Helm chart"
|
||||
default: "."
|
||||
VALUES_FILE:
|
||||
description: "Path to a values file (optional)"
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@@ -27,9 +33,11 @@ runs:
|
||||
- name: Helm Upgrade
|
||||
shell: sh
|
||||
run: |
|
||||
helm dependency update
|
||||
echo "Running: helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ./ -n ${{ inputs.DEPLOYMENT_NAME }}"
|
||||
helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ./ -n ${{ inputs.DEPLOYMENT_NAME }}
|
||||
helm dependency update ${{ inputs.CHART_PATH }}
|
||||
VALUES_FLAG=""
|
||||
if [ -n "${{ inputs.VALUES_FILE }}" ]; then VALUES_FLAG="--values ${{ inputs.VALUES_FILE }}"; fi
|
||||
echo "Running: helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAME }} $VALUES_FLAG"
|
||||
helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ${{ inputs.CHART_PATH }} -n ${{ inputs.DEPLOYMENT_NAME }} $VALUES_FLAG
|
||||
|
||||
- name: Remove kubeconfig
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user