xom9ikk-dotenv
dotenv@v2.3.0
GitHub Action to read .env file and add variables to GITHUB_ENV
🔥 Usage
✨ Features
- ⛳ ability to specify the path to the folder;
- 🎨 setup mode;
- 💎 simple API;
- 🍃 variable expansion;
💡 Input
| property | isRequired | default | comment | example |
|---|---|---|---|---|
| x | ./ | path to the folder where the .env file is located. | ./custom/path/to/folder/with/env |
| x | | mode for loading the .env file. | test |
| x | | sets whether the program should fail when the .env file is not present () or continue () | skip |
🧩 Notes
This action is built on top of the dotenv and dotenv-expand libraries.
When starting the action, the file is read from the target folder in the property and using the mode specified in.
The name of the file depends on the startup mode.
If you do not specify the launch mode, the file will be loaded.
If you need to load a file for a specific mode, you should specify the property.
Thus, specifying will read the file. will read and so on.
After reading and parsing the variables from the file, it writes them to .
If the action should continue when the .env file is not present, the optional flag can be set to . This can be particularly, for example, useful in secondary branches, where some aspects of the action may not be relevant.
Action also supports variable expansion, e.g.