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` | `""` |
|
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||||
| `CONTAINER_NAME` | <p>The container component to update</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` |
|
| `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-inputs source="action.yml" -->
|
||||||
|
|
||||||
<!-- action-docs-runs source="action.yml" -->
|
<!-- action-docs-runs source="action.yml" -->
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ inputs:
|
|||||||
VALUES_FILE:
|
VALUES_FILE:
|
||||||
description: "The values file to use"
|
description: "The values file to use"
|
||||||
default: "./helm/values.yaml"
|
default: "./helm/values.yaml"
|
||||||
|
CHART_PATH:
|
||||||
|
description: "Path to the Helm chart"
|
||||||
|
default: "./helm"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -30,6 +33,6 @@ runs:
|
|||||||
- name: Helm Diff
|
- name: Helm Diff
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
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"
|
echo "Running: $CMD"
|
||||||
eval "$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` | `""` |
|
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||||
| `CONTAINER_NAME` | <p>The container component to update</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` |
|
| `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-inputs source="action.yml" -->
|
||||||
|
|
||||||
<!-- action-docs-runs source="action.yml" -->
|
<!-- action-docs-runs source="action.yml" -->
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ inputs:
|
|||||||
VALUES_FILE:
|
VALUES_FILE:
|
||||||
description: "The values file to use"
|
description: "The values file to use"
|
||||||
default: "./helm/values.yaml"
|
default: "./helm/values.yaml"
|
||||||
|
CHART_PATH:
|
||||||
|
description: "Path to the Helm chart"
|
||||||
|
default: "./helm"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -26,6 +29,6 @@ runs:
|
|||||||
- name: Helm Set Image
|
- name: Helm Set Image
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
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"
|
echo "Running: $CMD"
|
||||||
eval "$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` | `""` |
|
| `IMAGE_TAG` | <p>The image tag to deploy</p> | `true` | `""` |
|
||||||
| `CONTAINER_NAME` | <p>The container component to update</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` |
|
| `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-inputs source="action.yml" -->
|
||||||
|
|
||||||
<!-- action-docs-runs source="action.yml" -->
|
<!-- action-docs-runs source="action.yml" -->
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ inputs:
|
|||||||
VALUES_FILE:
|
VALUES_FILE:
|
||||||
description: "The values file to use"
|
description: "The values file to use"
|
||||||
default: "./helm/values.yaml"
|
default: "./helm/values.yaml"
|
||||||
|
CHART_PATH:
|
||||||
|
description: "Path to the Helm chart"
|
||||||
|
default: "./helm"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -26,6 +29,6 @@ runs:
|
|||||||
- name: Helm Template
|
- name: Helm Template
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
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"
|
echo "Running: $CMD"
|
||||||
eval "$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` | <p>OCI registry hostname for helm dependency login</p> | `true` | `""` |
|
||||||
| `REGISTRY_USERNAME` | <p>Username for OCI registry login</p> | `true` | `""` |
|
| `REGISTRY_USERNAME` | <p>Username for OCI registry login</p> | `true` | `""` |
|
||||||
| `REGISTRY_TOKEN` | <p>Token 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-inputs source="action.yml" -->
|
||||||
|
|
||||||
<!-- action-docs-runs source="action.yml" -->
|
<!-- action-docs-runs source="action.yml" -->
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ inputs:
|
|||||||
REGISTRY_TOKEN:
|
REGISTRY_TOKEN:
|
||||||
description: "Token for OCI registry login"
|
description: "Token for OCI registry login"
|
||||||
required: true
|
required: true
|
||||||
|
CHART_PATH:
|
||||||
|
description: "Path to the Helm chart"
|
||||||
|
default: "."
|
||||||
|
VALUES_FILE:
|
||||||
|
description: "Path to a values file (optional)"
|
||||||
|
default: ""
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -27,9 +33,11 @@ runs:
|
|||||||
- name: Helm Upgrade
|
- name: Helm Upgrade
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
helm dependency update
|
helm dependency update ${{ inputs.CHART_PATH }}
|
||||||
echo "Running: helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ./ -n ${{ inputs.DEPLOYMENT_NAME }}"
|
VALUES_FLAG=""
|
||||||
helm upgrade ${{ inputs.DEPLOYMENT_NAME }} ./ -n ${{ inputs.DEPLOYMENT_NAME }}
|
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
|
- name: Remove kubeconfig
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user