Skip to content

Inconsistent allowed contexts for reusable workflow secrets/inputs #40391

Description

@matiboux

Code of Conduct

What article on docs.github.com is affected?

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

I have found inconsistencies between the actions/reference/workflows-and-actions/contexts.md and the actions/reference/workflows-and-actions/reusable-workflows.md pages.

The reusable-workflows.md page defines contexts for jobs.<job_id>.secrets.<secret_id> and jobs.<job_id>.with.<input_id> like so:

## `jobs.<job_id>.with.<input_id>`

[...]

Allowed expression contexts: `github`, and `needs`.
## `jobs.<job_id>.secrets.<secret_id>`

[...]

Allowed expression contexts: `github`, `needs`, and `secrets`.

This seems to match observed behavior that the following using vars, using a reusable workflow that requires a secret, does not work: After testing in a different and cleaner environment, this actually does not match the observed behavior, as the following using vars, using a reusable workflow that requires a secret, does work:

jobs:
  job:
    uses: job.yml
    secrets:
      MY_SECRET: ${{ vars.MY_SECRET }}

Indeed, the contexts.md page defines these contexts like so:

| `jobs.<job_id>.secrets.<secrets_id>` | `github, needs, strategy, matrix, secrets, inputs, vars` | None |
| `jobs.<job_id>.with.<with_id>` | `github, needs, strategy, matrix, inputs, vars` | None |

So I would have expected vars to work in this context, but it does not.

Also while we are at it, note the workflow keys are not consistent: secrets_id vs secret_id, and with_id vs input_id.

Therefore I would suggest to:

  • Rename the workflow keys in the contexts.md page to match those in the reusable-workflows.md page,
  • Update the "allowed expression contexts" in the reusable-workflows.md page to match what is described in the contexts.md page.

Additional information

No response

Activity

  1. added
    contentThis issue or pull request belongs to the Docs Content team
    on Sep 16, 2025
  2. welcome commented on Sep 16, 2025

    @welcome

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

  3. added
    triageDo not begin working on this issue until triaged by the team
    on Sep 16, 2025
  4. matiboux commented on Sep 16, 2025

    @matiboux
    Author

    Following new testing in a cleaner environment, it appears that the initial assumption was incorrect.
    The issue and PR has been updated to consider the allowed expression contexts from contexts.md as the source of truth and resolve inconsistencies accordingly.

  5. Sharra-writes commented on Sep 16, 2025

    @Sharra-writes
    Contributor

    @matiboux Thanks for opening an issue and PR! I'll take this over to our SMEs to make sure all of this behavior is intended, and I'll let you know what I find out.

  6. added
    github_actionsPull requests that update GitHub Actions content
    and removed
    triageDo not begin working on this issue until triaged by the team
    on Sep 16, 2025
  7. github-actions commented on Nov 18, 2025

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  8. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Nov 18, 2025
  9. removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Nov 22, 2025
  10. github-actions commented on Jan 6, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  11. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Jan 6, 2026
  12. matiboux commented on Jan 6, 2026

    @matiboux
    Author

    PR #40392 updated to keep the topic up to date.

  13. removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Jan 18, 2026
  14. github-actions commented on Sep 7, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  15. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Sep 7, 2026
  16. added and removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamgithub_actionsPull requests that update GitHub Actions contentnever-staleDo not close as stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions