JSON to environment variables
ActionsThis action reads json file and writes its content as environment variables with optional secret masking
v1.1.0
LatestBy rgarcia-phi
Tags
(2)This action reads json file and writes its content as environment variables with optional secret masking.
Required The JSON file.
The prefix. Default value json
.
Mask variables as secrets. Default value false
.
{
"value": "value",
"array": [
{
"value": "value 0"
},
"value 1"
],
"obj": {
"value1": "value1",
"value2": "value2"
}
}
- name: JSON to variables
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: 'test.json'
prefix: test
masked: true
- name: Show output
run: echo "The time was ${{ env.test_value }}, ${{ env.test_array_0_value }}, ${{ env.test_obj_value1 }}"
JSON to environment variables is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.