Skip to content

krisalay/export-env

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

export-env

This GitHub Action:

  • Sets up the environment variables from the file into the GitHub's environment.
  • Uses .env as the default filename

Usage

The following example illustrates how to invoke export-env from within a GitHub workflow:

name: Export ENV
on: [push]
jobs:
  export_env:
    runs-on: ubuntu-latest
    name: Testing the exported env
    steps:
      - name: Check Out Source Code
        uses: actions/checkout@v2
      - name: export env
        uses: krisalay/[email protected]
        with:
          filename: .env

This example workflow demonstrates the use of the krisalay/export-env action to set up environment variables from the .env file into the GitHub workflow.

Following are the most common use cases for this GitHub Action:

  • Use some data as environment variables while unit testing

Additional Considerations

  • In order to use export-env action, you will need to add data into the file in the key=value format.
  • key should not have any space.
  • file must exist in the root folder

Inputs

filename Required The filename which consists of the environment variables. It must exist in the root folder.