Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snsinahub/json-to-env
https://github.com/snsinahub/json-to-env
actions environment-variables json open-source
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/snsinahub/json-to-env
- Owner: snsinahub
- License: apache-2.0
- Created: 2022-09-20T14:27:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-04T19:00:33.000Z (8 months ago)
- Last Synced: 2024-04-04T20:24:22.813Z (8 months ago)
- Topics: actions, environment-variables, json, open-source
- Language: JavaScript
- Homepage:
- Size: 1.31 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-to-env
## Introduction
This action reads environment variables from a JSON file and add them as GitHub Actions environment variables.### Supported runners
- Linux
- Windows
- MacOS## Inputs
```YAML
- uses: snsinahub/[email protected]
with:
# path to json file
# default: ''
# required: true
json_path: ''```
## Examples
```YAML
- name: checkout
uses: actions/checkout@v3
- name: add env variables
uses: snsinahub/[email protected]
with:
json_path: "./environments/vars.json"
- name: print env variables
run: |
echo "${{ env.name }}"
```## Environment file sample
- [env.json](./env.json)