A GitHub Action that creates .env files from GitHub Secrets and variables for CI/CD workflows.
Create .Env File GitHub Action is a GitHub Action that generates .env files by mapping GitHub Secrets and other input variables to environment variables. It solves the problem of securely passing configuration and secrets to applications during CI/CD workflows without exposing them in code.
Developers and DevOps engineers using GitHub Actions for CI/CD who need to manage environment variables and secrets across build, test, or deployment steps.
It provides a secure, integrated way to handle secrets within GitHub's ecosystem, with support for multiline values and customizable output, reducing manual .env file creation and potential security risks.
Github Action to create a .env file with Github Secrets
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Directly pulls from GitHub Secrets, ensuring sensitive data like API keys are never hard-coded in source code or exposed in logs, as highlighted in the README's secret injection feature.
Uses a simple envkey_ prefix system to map static values, secrets, and GitHub variables to .env files, allowing for declarative configuration without complex scripting.
Handles multiline secrets like private keys by escaping newlines to \n and wrapping in quotes, making it compatible with standard .env parsers as described in the documentation.
Offers options to set output directory, filename, sort keys, and fail on empty values, providing fine-grained control over the generated .env file for different workflow needs.
Exclusively designed for GitHub Actions and Secrets, making it unusable with other CI/CD tools or external secret managers, which limits portability and flexibility.
Creates .env files in plain text without built-in encryption, potentially exposing secrets if the file is mishandled or accessed insecurely during the workflow execution.
Generates warnings for unexpected inputs due to GitHub's input validation, as admitted in the 'Potential Issues' section, which can clutter logs and obscure other workflow errors.