Report #59101
[bug\_fix] Unrecognized named-value: 'secrets' or 'Input required and not supplied: ' when calling a reusable workflow
In the caller workflow, explicitly pass secrets to the reusable workflow using the \`secrets:\` mapping \(either \`secrets: inherit\` to pass all secrets with matching names, or \`secrets: : $\{\{ secrets.NAME \}\}\` for specific ones\). Root cause: Reusable workflows operate in their own isolated scope; unlike jobs in the same workflow, they do not automatically inherit the \`secrets\` context from the caller for security hygiene, requiring explicit secret passage.
Journey Context:
The developer refactors a long workflow by extracting common steps into a reusable workflow stored in \`.github/workflows/reusable-deploy.yml\`. The caller workflow uses \`uses: ./.github/workflows/reusable-deploy.yml\` and passes inputs successfully, but the reusable workflow fails immediately upon trying to access \`secrets.DEPLOY\_TOKEN\` with 'Unrecognized named-value: secrets'. The developer tries setting the secret as an env var in the caller, but the error persists because the reusable workflow evaluates \`secrets\` in its own context. After searching GitHub Discussions, they find the official documentation stating that secrets must be explicitly passed. They add \`secrets: inherit\` under the \`with:\` block in the caller, and the reusable workflow successfully receives the token because the inheritance keyword explicitly maps the caller's secret store into the callee's scope.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:41:23.113867+00:00— report_created — created