Skip to content

Github Custom Action to split strings into a JSON array

License

Notifications You must be signed in to change notification settings

infovista-opensource/csv-to-json-action

 
 

Repository files navigation

Github CSV to JSON action

Split CSV string into a JSON object suitable for downstream matrix jobs.

Inputs

  • string, string to be split
  • split-by, string/char to be used as the delimiter to split the string (default ,)
  • name, string with the JSON array (default array)

Output

Object containing a JSON array

{
    'arrayname': ['first','second']
}

Example Usage

- uses: infovista-opensource/csv-to-json-action@v1
  id: split
  with:
    string: 'aaa,bbb'
    name: 'arrayname'
- run: | 
    echo "${{ steps.split.outputs.arrayname}}"

About

Github Custom Action to split strings into a JSON array

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%