https://github.com/simenandre/setup-variables
⚡️ Map variables on Github Actions runs based on input
https://github.com/simenandre/setup-variables
action actions github-actions
Last synced: 4 months ago
JSON representation
⚡️ Map variables on Github Actions runs based on input
- Host: GitHub
- URL: https://github.com/simenandre/setup-variables
- Owner: simenandre
- License: mit
- Created: 2021-02-08T11:58:03.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-02-17T20:08:16.000Z (4 months ago)
- Last Synced: 2026-02-27T13:40:02.243Z (4 months ago)
- Topics: action, actions, github-actions
- Language: TypeScript
- Homepage:
- Size: 570 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Map variable with ease
```yaml
uses: simenandre/setup-variables@v2
id: stack
with:
key: ${{ env.CI_REF_NAME_SLUG }}
map: |
main: prod
staging: staging
dev: dev
'*': dev
```
## How does this compare to X?
There are multiple other Github Actions step that tries to solve similar/same
issues.
[variable-mapper](https://github.com/marketplace/actions/variable-mapper) for
instance, has mostly the same functionality as this. The schema design is mostly
the same, only difference being that the original uses JSON for mapping.