Skip to content

snsinahub/json-to-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

  - uses: snsinahub/json-to-env@v2.0.0
    with: 
      # path to json file 
      # default: ''
      # required: true
      json_path: ''    

Examples

- 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 }}"        

Environment file sample