1
0
mirror of synced 2026-01-09 06:03:09 -05:00

Merge pull request #12488 from n-hebert/patch-2

Provide workflow_dispatch variable usage example
This commit is contained in:
Ramya Parimi
2021-12-08 14:06:14 -06:00
committed by GitHub

View File

@@ -294,6 +294,10 @@ A boolean specifying whether the secret must be supplied.
When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow.
The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."
### Example
{% raw %}
```yaml
on:
workflow_dispatch:
@@ -315,9 +319,16 @@ on:
description: 'Environment to run tests against'
type: environment
required: true {% endif %}
```
jobs:
print-tag:
runs-on: ubuntu-latest
The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."
steps:
- name: Print the input tag to STDOUT
run: echo The tag is ${{ github.event.inputs.tag }}
```
{% endraw %}
## `on.schedule`