1
0
mirror of synced 2026-01-05 12:07:35 -05:00
Files
docs/data/reusables/actions/pass-inputs-to-reusable-workflows.md
2022-06-06 18:13:12 -04:00

900 B

To pass named inputs to a called workflow, use the with keyword in a job. Use the secrets keyword to pass named secrets. For inputs, the data type of the input value must match the type specified in the called workflow (either boolean, number, or string).

{% raw %}

jobs:
  call-workflow-passing-data:
    uses: octo-org/example-repo/.github/workflows/reusable-workflow.yml@main
    with:
      username: mona
    secrets:
      envPAT: ${{ secrets.envPAT }}

{% endraw %}

{% ifversion actions-inherit-secrets-reusable-workflows %} Workflows that call reusable workflows in the same organization or enterprise can use the inherit keyword to implicitly pass the secrets.

{% raw %}

jobs:
  call-workflow-passing-data:
    uses: octo-org/example-repo/.github/workflows/reusable-workflow.yml@main
    with:
      username: mona
    secrets: inherit

{% endraw %}

{%endif%}