GitHub Actions reusable workflow secret not inherited
A called reusable workflow does not automatically receive the caller secrets. You must pass each secret under secrets:, or use secrets: inherit to forward all of the caller secrets.
What this error means
A reusable workflow sees empty secret values, even though the caller has them configured, because no secrets were forwarded.
# In the reusable workflow, secrets.NPM_TOKEN is '' because the caller did not forward itCommon causes
Secrets not forwarded by the caller
Without secrets: inherit or explicit pass-through, the callee gets no secrets.
Secret not declared in the reusable workflow
A reusable workflow must declare expected secrets under on.workflow_call.secrets.
How to fix it
Forward secrets to the reusable workflow
- In the caller, add secrets: inherit or pass secrets explicitly.
- In the reusable workflow, declare expected secrets under workflow_call.
- Reference them as secrets.NAME inside the reusable workflow.
# caller
jobs:
call:
uses: ./.github/workflows/reusable.yml
secrets: inheritHow to prevent it
- Use secrets: inherit or explicit pass-through for every reusable workflow.
- Declare required secrets in the reusable workflow_call definition.