Skip to content

Generate JSON array

Actions
Generate JSON array of length
v1.3
Latest
Star (0)

Generate Array

Coverage Test generate-array action

Generate JSON array of length

Usage workflow

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

ko-fi

Generate JSON array is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Generate JSON array of length
v1.3
Latest

Generate JSON array is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.