Answers: <p>Got it working with this helm github action</p>
  <p><a href="https://github.com/marketplace/actions/helm-3" rel="nofollow noreferrer">https://github.com/marketplace/actions/helm-3</a></p>
  <p>add secret to github as your .kube/config</p>
  <p>and this workflow step:</p>
  <pre><code>steps:  
        - name: 'check it out'
          uses: actions/checkout@v3
        - name: helm-deploy
          uses: WyriHaximus/github-action-helm3@v2.0
          with:
            exec: helm upgrade logstash /github/workspace/elk/logstash/ --install --wait --atomic --namespace=default --set=app.name=logstash --values=/github/workspace/elk/logstash/values.yaml
            kubeconfig: '${{ secrets.KUBECONFIG }}'
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2022-10-14T10:46:08.793Z
Answers: 2022-10-14T10:46:08.793Z
Answers: Serve Laurijssen
Body: <p>I've got a private github actions runner with a repo that contains a helm chart for logstash</p>
  <pre><code>runner@runnerdeploy-elkstack-6pkp9-45kpw:
  /runner/_work/elastic-logstash-kibana/elastic-logstash-kibana/elkhelmconfig/logstash$ ls
      Chart.yaml  templates  values.yaml
  </code></pre>
  <p>The values.yaml is in elkhelmconfig/logstash</p>
  <p>so manually I would go to the elkhelmconfig directory and run</p>
  <pre><code>helm install logstash logstash/
  </code></pre>
  <p>but how to do it from within the private runner automatically?
  There is no k8s config and the helm action fails on aws-cli not installed.</p>
  <p>Can it be done scripted by curl https://***helm &amp;&amp; chmod a+x helm &amp;&amp; helm upgrade logstash</p>
  <p>or something?</p>
  
Tags: <kubernetes><github><helm>
Title: how to automate helm deployments in github actions
UserDisplayName: Serve Laurijssen
ThreadText: # how to automate helm deployments in github actions
  
  (Asked by: username_0 on 2022-10-14)
  
  I've got a private github actions runner with a repo that contains a helm chart for logstash
  
  ```
  runner@runnerdeploy-elkstack-6pkp9-45kpw:
  /runner/_work/elastic-logstash-kibana/elastic-logstash-kibana/elkhelmconfig/logstash$ ls
      Chart.yaml  templates  values.yaml
  
  ```
  
  The values.yaml is in elkhelmconfig/logstash
  
  so manually I would go to the elkhelmconfig directory and run
  
  ```
  helm install logstash logstash/
  
  ```
  
  but how to do it from within the private runner automatically?
  There is no k8s config and the helm action fails on aws-cli not installed.
  
  Can it be done scripted by curl https://\*\*\*helm && chmod a+x helm && helm upgrade logstash
  
  or something?
  
  **Tags:** kubernetes, github, helm
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-10-14. Score: 2 | Accepted answer
  
  Got it working with this helm github action
  
  <https://github.com/marketplace/actions/helm-3>
  
  add secret to github as your .kube/config
  
  and this workflow step:
  
  ```
  steps:  
        - name: 'check it out'
          uses: actions/checkout@v3
        - name: helm-deploy
          uses: WyriHaximus/github-action-helm3@v2.0
          with:
            exec: helm upgrade logstash /github/workspace/elk/logstash/ --install --wait --atomic --namespace=default --set=app.name=logstash --values=/github/workspace/elk/logstash/values.yaml
            kubeconfig: '${{ secrets.KUBECONFIG }}'
  
  ```
  
  
  ---
  
  