{"id":23451527,"url":"https://github.com/kanga333/json-array-builder","last_synced_at":"2025-04-13T20:36:30.633Z","repository":{"id":38992094,"uuid":"366382689","full_name":"kanga333/json-array-builder","owner":"kanga333","description":"The kanga333/json-array-builder action is a TypeScript action that helps you to build JSON array to be used in dynamic matrix job.","archived":false,"fork":false,"pushed_at":"2024-04-29T19:21:47.000Z","size":736,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-14T09:13:46.034Z","etag":null,"topics":["github-action","github-actions","json","json-array","matrix"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanga333.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-11T12:58:38.000Z","updated_at":"2023-08-23T15:30:51.000Z","dependencies_parsed_at":"2022-09-02T21:41:16.982Z","dependency_job_id":null,"html_url":"https://github.com/kanga333/json-array-builder","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fjson-array-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fjson-array-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fjson-array-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fjson-array-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanga333","download_url":"https://codeload.github.com/kanga333/json-array-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231033496,"owners_count":18317990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-action","github-actions","json","json-array","matrix"],"created_at":"2024-12-24T00:26:13.393Z","updated_at":"2024-12-24T00:26:13.931Z","avatar_url":"https://github.com/kanga333.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-array-builder\n\n![test](https://github.com/kanga333/json-array-builder/workflows/test/badge.svg)\n\nThe `kanga333/json-array-builder` action is a TypeScript action that helps you to build JSON array to be used in dynamic matrix job.\n\n## Examples\n\nThis workflow decides the parameter to be used in the dynamic matrix at the job of `matrix_input`.\nAfter that, `dynamic_matrix` runs jobs in parallel based on the parameters passed to it.\n\n```yaml\nname: 'example'\non:\n  pull_request:\n  push:\n    branches:\n      - main\njobs:\n  matrix_input:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: kanga333/json-array-builder@main\n        id: array\n        with:\n          # Using this repository as an example, the output of the command is\n          # builder.ts\n          # execer.ts\n          # main.ts\n          cmd: ls src\n          separator: newline\n    outputs:\n      param: ${{ steps.array.outputs.build }}\n  dynamic_matrix:\n    needs:\n      - matrix_input\n    strategy:\n      matrix:\n        # Three matrix jobs work, builder.ts, execer.ts. main.ts\n        param: ${{ fromJson(needs.matrix_input.outputs.param) }}\n    runs-on: ubuntu-latest\n    steps:\n      - run: |\n          echo ${{ matrix.param }}\n```\n\n## Inputs\n\n|  name  |  description  |  default  |\n| ---- | ---- | ---- |\n|  str  |  String to split by separator to build JSON array. str cannot be used with cmd at the same time.  |  |\n|  cmd  |  Execute the given command and use the stdout to split by separator to build JSON array. str cannot be used with cmd at the same time.  |  |\n|  separator  |  String to separate a given input. If you need to separate by '\\n', please specify the value as 'newline'. Also, if you need to separate by ' ', please specify the value as 'space'.  |  newline  |\n|  json_array  |   If given JSON array string, this action appends to it.  | |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fjson-array-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanga333%2Fjson-array-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fjson-array-builder/lists"}