Split CSV string into a JSON object suitable for downstream matrix jobs.
string
, string to be splitsplit-by
, string/char to be used as the delimiter to split the string (default,
)name
, string with the JSON array (defaultarray
)
Object containing a JSON array
{
'arrayname': ['first','second']
}
- uses: infovista-opensource/csv-to-json-action@v1
id: split
with:
string: 'aaa,bbb'
name: 'arrayname'
- run: |
echo "${{ steps.split.outputs.arrayname}}"