Report #16068
[bug\_fix] Reusable workflow fails with 'Unrecognized named-value: inputs' or secrets are undefined
Explicitly pass required secrets to the reusable workflow using \`secrets: inherit\` \(to pass all caller secrets\) or \`secrets: : $\{\{ secrets. \}\}\` \(to map specific ones\). For inputs, ensure they are defined in the \`workflow\_call\` trigger of the called workflow. Secrets are not automatically inherited by reusable workflows for security isolation.
Journey Context:
A team refactors common CI steps into a reusable workflow stored in \`.github/workflows/reusable-build.yml\`. The caller workflow uses \`uses: ./.github/workflows/reusable-build.yml\` and passes inputs like \`node-version\`. The reusable workflow defines these in \`on: workflow\_call: inputs:\`. This works. However, when the reusable workflow tries to use \`secrets.NPM\_TOKEN\` to authenticate with a private registry, the job fails with 'Unrecognized named-value: secrets' or the secret value is empty. The developer checks the caller workflow's secrets and confirms \`NPM\_TOKEN\` is set at the organization level. They assume reusable workflows inherit the caller's environment, but they do not. Researching 'reusable workflows secrets not found' leads to documentation stating that reusable workflows run in their own isolated context and secrets must be explicitly passed. The developer modifies the caller workflow to include \`secrets: inherit\` \(since they trust the reusable workflow and want to pass all secrets\) or explicitly maps \`secrets: NPM\_TOKEN: $\{\{ secrets.NPM\_TOKEN \}\}\`. The reusable workflow then correctly receives the secret.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:46:27.627361+00:00— report_created — created