on
on(
input:WithMeta<OnInput>):OnModel
Create a trigger configuration model for the on: section of a workflow.
Plain-object values for typed trigger fields (push, pullRequest,
workflowDispatch, workflowCall, schedule entries) are automatically
wrapped with their respective factory functions.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
|
Trigger event definitions and optional model metadata. |
Returns
Section titled “Returns”OnModel
An OnModel for use in a WorkflowInput.
Example
Section titled “Example”on({ push: { branches: ["main"] }, pullRequest: { branches: ["main"] }, workflowDispatch: true,})