Skip to content

feat(env): Introduce raw ENV secret templating and remove env_blob input#14

Merged
Hordunlarmy merged 1 commit into
mainfrom
dev
Jan 29, 2026
Merged

feat(env): Introduce raw ENV secret templating and remove env_blob input#14
Hordunlarmy merged 1 commit into
mainfrom
dev

Conversation

@Hordunlarmy
Copy link
Copy Markdown
Member

This pull request introduces a major overhaul to how environment files are managed and generated in MetalDeploy, focusing on enhanced flexibility, security, and maintainability. The most significant change is the removal of the env_blob input in favor of a more powerful ENV secret, which now acts as a raw template for environment files, preserving formatting and comments while allowing for intelligent merging of variables. Additionally, the security of generated files has been improved, and documentation has been updated to reflect these changes.

Environment Variable Handling and Templating:

  • Introduced a new merging mechanism that allows the ENV secret to serve as a base template for generated .env files. This preserves comments, blank lines, and formatting, and supports seamless merging of new or overridden variables. [1] [2]
  • The internal logic for generating environment files has been refactored to prioritize this new approach, including enhancements to the parse_all_in_one_secret function for better parsing control.

Security Improvements:

  • Generated environment files now use stricter 0o600 permissions (read/write for owner only), improving the protection of secrets. [1] [2] [3]

Removal of Deprecated Functionality:

  • The env_blob input and its related documentation and logic have been removed from action.yml and README.md, consolidating all bulk secret injection into the ENV secret. [1] [2] [3] [4] [5] [6] [7]

Documentation Updates:

  • Updated README.md and docs/env-generation.md to explain the new environment variable management approach, the removal of env_blob, and the improved security model. [1] [2]

Test Coverage:

  • Improved test coverage for env_manager.py, reflecting the refactored and expanded logic around environment file handling. [1] [2]

These changes make environment management more robust, secure, and user-friendly, while simplifying configuration for end users.

@Hordunlarmy Hordunlarmy merged commit 74092ad into main Jan 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant