A GitHub Action that exposes useful environment variables like repository slugs, branch names, and PR details for CI/CD workflows.
GitHub Environment Variables Action is a GitHub Action that exposes a rich set of environment variables for use in CI/CD workflows. It solves the problem of needing to manually parse and transform GitHub's default environment variables by providing pre-processed values like slugified repository names, branch references, and pull request details. This makes it easier to reference these values consistently across scripts and configurations.
Developers and DevOps engineers building GitHub Actions workflows who need reliable, pre-processed environment variables for scripting, logging, or dynamic configuration.
Developers choose this action because it saves time and reduces errors by providing a comprehensive, standardized set of environment variables out-of-the-box, eliminating the need for custom parsing logic and ensuring consistency across workflows.
:octocat: 🚀 GitHub Action for Environment Variables
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Exposes a wide array of variables including repository slugs, branch references, and PR metadata, as detailed in the table with examples like CI_REPOSITORY_SLUG and CI_PR_TITLE, reducing the need for manual parsing.
Provides URL-friendly slugs truncated to 63 characters for safe use in URLs and filenames, eliminating the need for additional sanitization steps in scripts.
Uses a consistent CI_ prefix for all variables, ensuring clarity and reducing confusion when integrating across multiple workflows or teams.
Simple to add with a single uses statement in workflow YAML, as shown in the example usage, requiring minimal configuration overhead.
Variables like CI_PR_NUMBER are only set for pull request events, which can lead to undefined variables in other contexts if not properly handled, adding complexity to error-prone workflows.
Introduces reliance on an external repository, posing potential security vulnerabilities or breaking changes with updates, unlike using GitHub's native variables directly.
The slugification is hardcoded to truncate at 63 characters with specific transformations, which may not align with all naming conventions or use cases without manual workarounds.