Skip to content

Clarify vars and secrets context availability in composite actions - #46249

Open
alok-108 wants to merge 1 commit into
github:mainfrom
alok-108:clarify-vars-context-composite-actions
Open

alok-108 wants to merge 1 commit into
github:mainfrom
alok-108:clarify-vars-context-composite-actions

Conversation

@alok-108

@alok-108 alok-108 commented Oct 10, 2026 •

Copy link
Copy Markdown

Why:

Closes: #46232

Inside composite actions, contexts such as secrets and vars are not directly available to the action's steps because variable contexts are filtered and resolved at the calling job level (as noted in the Composite Actions ADR and actions/runner#4311).

While the documentation for the secrets context explicitly notes that it is unavailable in composite actions and must be passed as an input, the documentation for the vars context previously did not mention this, leading users to assume vars could be accessed directly in composite actions.

What's being changed:

  • content/actions/reference/workflows-and-actions/contexts.md: Updated the vars context section to clarify that vars is not available directly within composite actions, mirroring the existing clarification in the secrets context section.
  • content/actions/tutorials/create-actions/create-a-composite-action.md: Added a note explaining that composite actions do not have direct access to secrets or vars contexts, and that values should be passed explicitly using inputs.
  • content/actions/reference/workflows-and-actions/metadata-syntax.md: Clarified under composite action inputs that secrets and vars contexts are not directly available inside composite actions.

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

@welcome

welcome Bot commented Oct 10, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/reference/workflows-and-actions/contexts.md fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18
fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18
actions/reference/workflows-and-actions/metadata-syntax.md fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18
fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18
actions/tutorials/create-actions/create-a-composite-action.md fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18
fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify vars context availability in composite actions

1 participant