You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a JSON object for `value`. You can use this function to provide a JSON object as an evaluated expression.
365
+
Returns a JSON object or JSON data type for `value`. You can use this function to provide a JSON object as an evaluated expression or to convert environment variables from a string.
366
366
367
-
##### Example
367
+
##### Example returning a JSON object
368
368
369
369
This workflow sets a JSON matrix in one job, and passes it to the next job using an output and `fromJSON`.
370
370
@@ -384,12 +384,33 @@ jobs:
384
384
needs: job1
385
385
runs-on: ubuntu-latest
386
386
strategy:
387
-
matrix: ${{fromJson(needs.job1.outputs.matrix)}}
387
+
matrix: ${{fromJSON(needs.job1.outputs.matrix)}}
388
388
steps:
389
389
- run: build
390
390
```
391
391
{% endraw %}
392
392
393
+
##### Example returning a JSON data type
394
+
395
+
This workflow uses `fromJSON` to convert environment variables from a string to a Boolean or integer.
0 commit comments