question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Github actions not adding .env file to source code

See original GitHub issue

I am facing issues with creating .env file. I am deploying my project using Google app engine. The project gets deployed but .env file is not created. Can you please help me with the issue.

This is my main.yaml file-

name: CI

on:
  push:
    branches: [ deploy ]
  pull_request:
    branches: [ deploy ]
  
jobs:
  create-envfile:
    runs-on: ubuntu-18.04
    steps:
      - name: Make envfile
        uses: SpicyPizza/create-envfile@v1
        with:
          envkey_DEBUG: False
          envkey_DATABASE_URL: ${{ secrets.DATABASE_URL }}
          envkey_USER: ${{ secrets.USER }}
          envkey_PASSWORD: ${{ secrets.PASSWORD }}
          envkey_DATABASE_NAME: ${{ secrets.DATABASE_NAME }}
          file_name: .env

  
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Initialize Google Cloud SDK
        uses: zxyle/publish-gae-action@master
        with:
          service_account_email: ${{ secrets.GCP_SA_EMAIL }}
          service_account_key: ${{ secrets.GCP_SA_KEY }}
          project_id: ${{ secrets.PROJECT_ID }}
          gae_variables: ${{ secrets.GAE_VARIABLES }}

      - name: Publish app to Google App Engine
        run: |
          gcloud auth activate-service-account ${{ secrets.GCP_SA_EMAIL }} --key-file=client-secret.json
          gcloud config set project ${{ secrets.PROJECT_ID }}
          gcloud -q app deploy app.yaml --promote

Please check the output at https://github.com/khannakshat7/Elektra/actions/runs/888591866

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
khannakshat7commented, May 31, 2021

@sumit4613 Thank You so much. You are awesome!! I wasted lot of time to figure this out and finally I got the solution.

0reactions
ianrusselcommented, Sep 28, 2022

Error: Unable to resolve action SpicyPizza/create-envfile@master, unable to find version master

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I use an env file with GitHub Actions? - Stack Overflow
Show activity on this post. The easiest way to do this is to create the . env file as a github secret and...
Read more >
How to use GitHub Actions environment variables - Snyk
The sample code already has an example GitHub Actions workflow file. ... To set up a workflow-level environment variable, we must define it ......
Read more >
Launching GitHub Actions Environment Variables and Secrets
1. Create a directory named . · 2. Next, create a file with your preferred name in the . · 3. Commit and...
Read more >
Use Secret Environment Variables in GitHub Actions
In the GitHub Repo Set Those Sensitive Environment Variables · Access the Repo's Settings Tab · Set New Environment Secrets · Run Your...
Read more >
How to inject environment variables into GitHub Actions - Cleavr
First, let's set some 'secrets' to the GitHub repo so that we can use them in our workflow file. The secrets option is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found