Report #37055
[bug\_fix] Reusable workflows receive empty secrets or 'Required secret is missing' even when the caller workflow has access to them
Explicitly pass secrets to the reusable workflow using \`secrets: inherit\` \(to pass all\) or \`secrets: \{ MY\_SECRET: $\{\{ secrets.MY\_SECRET \}\} \}\` \(to pass specific ones\). Do not assume secrets are automatically inherited.
Journey Context:
You refactor your workflow into a reusable workflow in \`.github/workflows/reusable.yml\`. It needs a \`NPM\_TOKEN\` secret. You call it from your main workflow, but the reusable job fails with 'authentication failed' or an empty token. You check the caller's \`secrets\` context and it has the value. You search and discover that reusable workflows are isolated; they do not automatically inherit the \`secrets\` context from the caller for security reasons. You must add \`secrets: inherit\` to the \`uses\` call, or explicitly map the secrets, which then makes them available inside the reusable workflow via \`secrets.MY\_SECRET\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:40:30.059924+00:00— report_created — created