This action reads environment variables from a JSON file and add them as GitHub Actions environment variables.
- Linux
- Windows
- MacOS
- uses: snsinahub/json-to-env@v2.0.0
with:
# path to json file
# default: ''
# required: true
json_path: ''
- name: checkout
uses: actions/checkout@v3
- name: add env variables
uses: snsinahub/json-to-env@v2.0.0
with:
json_path: "./environments/vars.json"
- name: print env variables
run: |
echo "${{ env.name }}"