Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Clarify vars context availability in composite actions

Open Beginner friendly
#46,232 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, typescript
Domain
documentation

Research direction

Read the contexts reference and the composite actions article linked in the issue, then check how those pages are organized in the docs repository. Clarify that values a composite action needs, including values from vars, should be passed through inputs; use the examples in the issue to verify the guidance is consistent across both pages.

Written by the indexing model from the issue text.

Description

content triage
Code of Conduct
What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/contexts

https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action

What part(s) of the article would you like to see updated?

The documentation is unclear about whether the vars context is available inside composite actions.

The contexts reference lists vars as an available context, which can reasonably lead users to assume that this works inside a composite action:

runs:
  using: composite
  steps:
    - shell: bash
      run: echo "${{ vars.AWS_REGION }}"

However, the Composite Actions ADR states:

"Composite actions should leverage inputs to get values they need, they will not have full access to the context objects."

There is also an implementation detail documented by a runner collaborator in actions/runner#4311: variables are filtered based on references made directly in the calling job, so a vars reference used only inside a composite action may not be available to the runner.

Could the composite actions documentation explicitly clarify that values required by a composite action should be passed through inputs, including values originating from vars?

For example:

- uses: ./my-action
  with:
    region: ${{ vars.AWS_REGION }}

and then inside the composite action:

${{ inputs.region }}

This would make the relationship between the general contexts documentation and the more limited context availability of composite actions clearer.

Thanks

Additional information

No response

Dominant language
TypeScript
Stars
21k
Forks
69k
Avg merge
8h 37m
Merged PRs (30d)
117

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/docs

All issues in github/docs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.