Skip to content

supriyaaddagada/json-to-variables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON to variables

This action reads json file and writes its content as environment variables.

Inputs

filename

Required The JSON file.

prefix

The prefix (optional). Default value is empty string.

Usage

File content

{
    "value": "value",
    "array": [
        {
            "value": "value 0"
        },
        "value 1"
    ],
    "obj": {
        "value1": "value1",
        "value2": "value2"
    }
}

YML example

- name: JSON to variables
  uses: antifree/json-to-variables@v1.0.1
  with:
    filename: 'test.json'
    prefix: 'test'
- name: Show output
  run: echo "The time was ${{ env.test_value }}, ${{ env.test_array_0_value }}, ${{ env.test_obj_value1 }}"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published