2

Im using github actions to deploy helm chart on eks. Here are steps:

  1. Build the docker image
  2. Push an image to ECR with git commit sha as tag.(Tag Ex: develop-21df036.... ) So i want reference this tag in helm values.yaml here as
  repository:1234.dcr.ecr.eu-west-1.amazonaws.com/repo-name
  pullPolicy: Always
  # Overrides the image tag whose default is the chart appVersion.
  tag: <tag> 

so i tried with develop-${{ github.sha }} variable in tag, but this commit id will get once pushed to repo. Is there any other way to achieve this ? Thanks

Akshay Awate
  • 127
  • 4
  • 8
  • Does this answer your question? [How to pull environment variables with Helm charts](https://stackoverflow.com/questions/49928819/how-to-pull-environment-variables-with-helm-charts) – rethab Dec 01 '21 at 11:23
  • the environment variable is called `GITHUB_SHA`: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables – rethab Dec 01 '21 at 11:23
  • 1
    i used this values flag, values: image.tag=develop-${{ github.sha }}. Now this works. thanks @rethab – Akshay Awate Dec 01 '21 at 13:28

0 Answers0