Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)