1
0
mirror of synced 2026-01-06 06:02:35 -05:00
Files
docs/data/reusables/actions/pass-inputs-to-reusable-workflows.md
Florian Wagner 34a7be5cc8 Exchange usage of action my-action with actions/labeler (#31312)
Signed-off-by: Florian Wagner <h2floh@github.com>
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
2022-10-05 03:47:09 +00:00

937 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:
      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%}