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