From 59c9d60cf4a3014a028f21ae8443bafb59cde81a Mon Sep 17 00:00:00 2001 From: Sylvan LE DEUNFF Date: Fri, 29 Sep 2023 00:16:53 +0200 Subject: [PATCH] Update helm-deploy.yml --- .github/workflows/helm-deploy.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-deploy.yml b/.github/workflows/helm-deploy.yml index 22519b7..71ba776 100644 --- a/.github/workflows/helm-deploy.yml +++ b/.github/workflows/helm-deploy.yml @@ -20,6 +20,9 @@ on: k8s_namespace: type: string required: true + secrets: + k8s_config: + required: true jobs: install-chart: @@ -30,9 +33,17 @@ jobs: - uses: azure/setup-helm@v3 with: version: "${{ inputs.helm_version }}" + + - name: "Create k8s config" + run: | + mkdir -p ~/.kube + echo "${{ secrets.k8s_config }}" > ~/.kube/config - name: "Deploy chart" run: | echo "${{ inputs.helm_chart_values }}" \ - | helm template "${{ inputs.helm_release_name }}" "${{ inputs.helm_chart_path }}" \ - --values "-" --namespace "${{ inputs.k8s_namespace }}" + | helm upgrade "${{ inputs.helm_release_name }}" "${{ inputs.helm_chart_path }}" \ + --install --values "-" --namespace "${{ inputs.k8s_namespace }}" + + - name: "Delete k8s config" + run: rm ~/.kube/config