Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 941 Bytes

pass-inputs-to-reusable-workflows.md

File metadata and controls

33 lines (25 loc) · 941 Bytes

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:
      config-path: .github/labeler.yml
    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:
      config-path: .github/labeler.yml
    secrets: inherit

{% endraw %}

{%endif%}