This GitHub Action:
- Sets up the environment variables from the file into the GitHub's environment.
- Uses .env as the default filename
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
- 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
filename
Required The filename which consists of the environment variables. It must exist in the root folder.