SpicyPizza/create-envfile

Fail if secret is not defined

Closed this issue · 3 comments

I would like the workflow step to fail if the secret is not defined. But currently, it is not the case.

    - name: Make envfile for testing environment
      uses: SpicyPizza/create-envfile@v1
      with:
        envkey_STRIPE_SECRET_KEY: ${{ secrets.SECRET_VARIABLE }}

        file_name: .env

This still passes even if secrets.SECRET_VARIABLE is not defined

You could try forking it, the code isn't that complex. Check out https://github.com/SpicyPizza/create-envfile/blob/beb6b69/src/create-envfile.py#L18-L20, where it already does it for another var

Ah this is a good point. I'll see if I can get that in soon.

hey, @AngelOnFira I would like to work on this, if anyone is not working yet. 😄