Skip to content

Commit

Permalink
Update helm-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hoshiyosan authored Sep 28, 2023
1 parent 6850bb6 commit 59c9d60
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/helm-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
k8s_namespace:
type: string
required: true
secrets:
k8s_config:
required: true

jobs:
install-chart:
Expand All @@ -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

0 comments on commit 59c9d60

Please sign in to comment.