Skip to content

Commit ad605a4

Browse files
chrispathubwriter
andauthored
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>
1 parent a45a14f commit ad605a4

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

content/actions/learn-github-actions/workflow-syntax-for-github-actions.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ For more information, see "[About comparing branches in pull requests](/pull-req
187187
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
188188
## `on.workflow_call.inputs`
189189

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)."
191191

192192
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).
193193

@@ -268,7 +268,7 @@ A boolean specifying whether the secret must be supplied.
268268

269269
## `on.workflow_dispatch.inputs`
270270

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.
272272

273273
```yaml
274274
on:
@@ -277,10 +277,20 @@ on:
277277
logLevel:
278278
description: 'Log level'
279279
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 %}
281286
tags:
282287
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 %}
284294
```
285295

286296
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

Comments
 (0)