caseycs/single-variable-mapper
Github action to simplify variable mapping by a specific key
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| key | Key to match the map argument | yes | — |
| map | Pairs of regular expressions and resulting values, divided by separator | yes | — |
| export_to | Comma-separated list of targets to export variables to. Possible options: env, output | — | output |
| export_to_env_name | Environment variable name when export_to contains env | — | "" |
| separator | Separator between regular expression and result value | — | : |
| mode | Specify the behavior of getting the variable. Possible options: strict, fallback-to-original, fallback-to-default | — | strict |
| default | Default value, used when mode is fallback-to-default and not match was found | — | "" |
| allow_empty_map | Do not throw error when empty map was provided, requires mode to be other than strict | — | false |
Outputs
| name | description |
|---|---|
| value | Mapped value |