Generate JSON array
Version updated for yakubique/generate-array to version v1.1.
- This action is used across all versions by ? repositories.
Go to the GitHub Marketplace to find the latest changes.
Release notes
Generate Array
Generate JSON array of length Full Changelog: https://github.com/yakubique/generate-array/compare/v1...v1.1
Usage
- name: Generate Array
id: list
uses: yakubique/generate-array@v1.1
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}}” |
Outputs
OUTPUT | TYPE | DESCRIPTION |
---|---|---|
result | string | Result array |