You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
JSON to variables
v1.0.0
This action reads json file and writes its content as environment variables.
Required The JSON file.
The prefix. Default value json
.
{
"value": "value",
"array": [
"value 0",
"value 1"
],
"obj": {
"value1": "value1",
"value2": "value2"
}
}
- name: JSON to variables
uses: antifree/json-to-variables@v1
with:
filename: 'test.json'
prefix: test
- name: Show output
run: echo "The time was ${{ env.test_value }}, ${{ env.test_array_0_ }}, ${{ env.test_obj_value1 }}"