You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated workflow inputs example to include types (#22588)
* Updated workflow inputs example to include types
* Add versioning for GHEC/GHES/GHAE
* Remove links to actions.yaml info
Co-authored-by: hubwriter <hubwriter@github.com>
Copy file name to clipboardExpand all lines: content/actions/learn-github-actions/workflow-syntax-for-github-actions.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,7 @@ For more information, see "[About comparing branches in pull requests](/pull-req
187
187
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
188
188
## `on.workflow_call.inputs`
189
189
190
-
When using the `workflow_call` keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. Inputs for reusable workflows are specified with the same format as action inputs. For more information about inputs, see "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)." For more information about the `workflow_call` keyword, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)."
190
+
When using the `workflow_call` keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. For more information about the `workflow_call` keyword, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)."
191
191
192
192
In addition to the standard input parameters that are available, `on.workflow_call.inputs` requires a `type` parameter. For more information, see [`on.workflow_call.inputs.<input_id>.type`](#onworkflow_callinputsinput_idtype).
193
193
@@ -268,7 +268,7 @@ A boolean specifying whether the secret must be supplied.
268
268
269
269
## `on.workflow_dispatch.inputs`
270
270
271
-
When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. Workflow dispatch inputs are specified with the same format as action inputs. For more information about the format see "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)."
271
+
When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow.
272
272
273
273
```yaml
274
274
on:
@@ -277,10 +277,20 @@ on:
277
277
logLevel:
278
278
description: 'Log level'
279
279
required: true
280
-
default: 'warning'
280
+
default: 'warning' {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %}
281
+
type: choice
282
+
options:
283
+
- info
284
+
- warning
285
+
- debug {% endif %}
281
286
tags:
282
287
description: 'Test scenario tags'
283
-
required: false
288
+
required: false {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %}
289
+
type: boolean
290
+
environment:
291
+
description: 'Environment to run tests against'
292
+
type: environment
293
+
required: true {% endif %}
284
294
```
285
295
286
296
The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."
0 commit comments