werf / actions

Set of actions for implementing CI/CD with werf and GitHub Actions
https://werf.io/
Apache License 2.0
82 stars 5 forks source link

Pass github secrets into values.yaml #53

Closed mutagenspree closed 2 years ago

mutagenspree commented 2 years ago

Hi! I try to use werf 1.2 with github actions. I've had problem with passing secrets from Github to helm. I've tried different combination but i didn't get how to use values to helm release. My workflow:

---
      - name: Converge
        uses: werf/actions/converge@v1.2
        with:
          env: staging
          kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
        env:
          JWT_SECRET: ${{secrets.JWT_SECRET}}

My values.yaml

---
secrets:
  api-secret:
    JWT_SECRET: ""

I tried WERF_SET_JWT_SECRET: ${{secrets.JWT_SECRET}}; WERF_SET_JWT_SECRET=secrets.api-secret.jwt_secret=${{secrets.JWT_SECRET}}; JWT_SECRET=secrets.api-secret.jwt_secret=${{secrets.JWT_SECRET}} but nothing helps

alexey-igrychev commented 2 years ago

Hi! Based on your values.yaml you should use the following environment variable:

env:
  WERF_SET_JWT_SECRET: secrets.api-secret.JWT_SECRET=${{ secrets.JWT_SECRET }}
mutagenspree commented 2 years ago

Thank you so much! It works!