inspira-legal/Get Environment Variables
Fetch repository or deployment-environment variables from GitHub and inject them as environment variables and/or step outputs — without binding the job to a deployment environment.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | Token used to read variables. The default GITHUB_TOKEN usually cannot read repo/environment variables — use a fine-grained PAT or GitHub App token with "Variables: read" (and "Environments: read" for environment scope). | no | ${{ github.token }} |
| environment | Deployment environment name to read variables from. Leave empty to fetch repository-level variables instead. | no | "" |
| repository | Target repository in "owner/repo" format. Defaults to the current repository. | no | ${{ github.repository }} |
| output-to | Where to inject variables: "env", "output", or "all". | no | all |
| prefix | String prepended to every injected variable name (e.g. "STAGING_"). | no | "" |
| name-case | Case transform for injected names: "none", "upper", or "lower". | no | none |
| include | Comma/newline separated glob patterns (`*`, `?`) of variable names to include. Empty means include everything. | no | "" |
| exclude | Comma/newline separated glob patterns (`*`, `?`) of variable names to exclude. Exclude always wins over include. | no | "" |
| overwrite | When injecting env vars, overwrite names that are already set. | no | true |
| dry-run | If true, do not set anything — only log what would be injected. | no | false |
| fail-on-empty | Fail the action if no variables match after filtering. | no | false |
Outputs
| name | description |
|---|---|
| variables | JSON object mapping every injected variable name to its value. |
| names | Comma-separated list of injected variable names (after prefix/case). |
| count | Number of variables injected. |