Skip to content

Commit 10cf37e

Browse files
authored
Clarify that vars context is unavailable in composite actions
1 parent e52ecac commit 10cf37e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • content/actions/reference/workflows-and-actions

‎content/actions/reference/workflows-and-actions/contexts.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ This example workflow shows how configuration variables set at the repository, e
361361

362362
> [!NOTE]
363363
> Configuration variables at the environment level are automatically available after their environment is declared by the runner.
364-
364+
> [!NOTE]
365+
> The `vars` context is not available inside a composite action. To use a repository variable inside a composite action, pass it as an `input` from the calling workflow. For example, pass `${{ vars.MY_VAR }}` as `with: my-var: ${{ vars.MY_VAR }}` in the calling workflow, then use `${{ inputs.my-var }}` inside the composite action.
365366
{% data reusables.actions.actions-vars-context-example-usage %}
366367

367368
## `job` context

0 commit comments

Comments
 (0)