Skip to main content

JsonActionTemplate interface

Represents a JSON template action with a matrix for expansion.

Signature

export interface JsonActionTemplate

Remarks

Template actions use matrix parameters to generate multiple action variants from a single definition via Cartesian product expansion. This enables creating platform-specific or configuration-specific actions without duplication.

Example usage in package.json:

"actions": {
"build-{{ matrix.platform }}": {
"matrix": {
"platform": ["linux", "darwin", "win32"]
},
"template": "make build PLATFORM={{ matrix.platform }}"
}
}

This generates three actions: build-linux, build-darwin, and build-win32. Matrix values are accessible in both the action name and template content via {{ matrix.key }} Liquid syntax.

Properties

Property

Modifiers

Type

Description

matrix

JsonTemplateMatrix

The matrix of parameters used to generate action variants.

template

JsonActionContent

The action template content.


Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.