Generate JSON array
Version updated for yakubique/generate-array to version v1.3.
- This action is used across all versions by ? repositories.
Go to the GitHub Marketplace to find the latest changes.
Release notes
Full Changelog: https://github.com/yakubique/generate-array/compare/v1.2...v1.3
Generate Array
Generate JSON array of length
Usage
- name: Generate Array
id: list
uses: yakubique/generate-array@v1.3
with:
length: 10
startIndex: 1
template: "$item-{{index}}"
# "["$item-1","$item-2","$item-3","$item-4","$item-5","$item-6","$item-7","$item-8","$item-9"]"
Inputs
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
length | string | true | Array length | |
negativeOnly | string | false | "false" | Return only negative values |
positiveOnly | string | false | "false" | Return only positive values |
startIndex | string | false | "0" | What should be first index (default: 0) |
template | string | false | By default array values are indexes, can be customized with template. Example: “item-{{index}}” | |
to_file | string | false | "false" | Save result to file |
Outputs
OUTPUT | TYPE | DESCRIPTION |
---|---|---|
result | string | Result array |