Load Environment Variables
ActionsTags
(2)This GitHub Action allows you to load environment variables from a given string content. It creates a temporary .env file and loads the variables using the dotenv action.
- Load environment variables from string content
- Configurable failure mode (strict/skip) when no environment variables are found
- Creates temporary
.envfile to avoid workspace pollution - Supports both strict and skip modes for handling missing environment variables
- uses: ilaipi-freedom/load-env-action@v1.0.0
with:
env_content: |
KEY1=value1
KEY2=value2
load_mode: 'strict' # Optional, defaults to 'strict'| Name | Description | Required | Default |
|---|---|---|---|
env_content |
Content of environment variables | false | '' |
load_mode |
Sets whether the program should fail when no env content is found (strict) or continue (skip) | false | 'strict' |
None
- uses: ilaipi-freedom/load-env-action@v1.0.0
with:
env_content: ${{ secrets.MY_ENV }}- uses: ilaipi-freedom/load-env-action@v1.0.0
with:
env_content: |
API_KEY=123456
DB_URL=mongodb://localhost:27017- uses: ilaipi-freedom/load-env-action@v1.0.0
with:
load_mode: 'skip'MIT
Load Environment Variables is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.