Skip to content

Commit dcb4a5c

Browse files
authored
Merge branch 'main' into repo-sync
2 parents 7b5711e + 8ed9291 commit dcb4a5c

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ A boolean specifying whether the secret must be supplied.
294294

295295
When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow.
296296

297+
The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."
298+
299+
### Example
300+
{% raw %}
297301
```yaml
298302
on:
299303
workflow_dispatch:
@@ -315,9 +319,16 @@ on:
315319
description: 'Environment to run tests against'
316320
type: environment
317321
required: true {% endif %}
318-
```
322+
323+
jobs:
324+
print-tag:
325+
runs-on: ubuntu-latest
319326
320-
The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."
327+
steps:
328+
- name: Print the input tag to STDOUT
329+
run: echo The tag is ${{ github.event.inputs.tag }}
330+
```
331+
{% endraw %}
321332

322333
## `on.schedule`
323334

0 commit comments

Comments
 (0)