Report #24687
[bug\_fix] Input required and not supplied: token or secrets context undefined in composite actions
Explicitly pass the secret or token as an input to the composite action in the calling workflow's 'with:' block. In the composite action's 'action.yml', define the input \(e.g., 'github-token'\), and reference it in the steps using '$\{\{ inputs.github-token \}\}'. Do not attempt to access 'secrets.\*' or 'github.token' directly inside the composite action's steps as if it were a reusable workflow; the 'secrets' context is not available inside composite actions.
Journey Context:
A team creates a composite action to standardize linting across repos. The action needs to checkout a private shared configuration repo, so it uses 'actions/checkout' with a 'token' input. In the action.yml, they write 'runs: using: composite' and have a step using 'actions/checkout@v4 with: token: $\{\{ secrets.GH\_PAT \}\}'. When they try to use this action in a workflow, it fails immediately saying 'Unrecognized named-value: 'secrets''. The developer is confused because secrets work fine in normal workflow steps. They try changing it to '$\{\{ github.token \}\}' but get the same error regarding context availability. They search and find that composite actions are not reusable workflows; they are just a way to group steps. The 'secrets' context and 'github.token' are not automatically injected. The solution is to treat the token as an input: they modify action.yml to add 'inputs: github-token: required: true', change the checkout step to 'token: $\{\{ inputs.github-token \}\}', and then in the calling workflow they explicitly pass 'with: github-token: $\{\{ secrets.GH\_PAT \}\}'. This works because the secret is resolved in the caller's context \(which has access to secrets\) and passed as a string input to the composite action.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:50:41.013904+00:00— report_created — created