GitHub Actions secrets: inherit does not reach a nested reusable workflow
secrets: inherit forwards the caller’s secrets to a directly-called reusable workflow. It does not automatically propagate through a chain: a middle workflow must itself pass secrets: inherit (or named secrets) when it calls a deeper reusable workflow.
What this error means
Secrets are available in the first reusable workflow but empty in a reusable workflow it calls in turn.
github-actions
# caller -> middle.yml (secrets: inherit) -> deploy.yml
# middle.yml calls deploy.yml WITHOUT forwarding secrets
jobs:
go:
uses: ./.github/workflows/deploy.yml # secrets not forwarded -> empty in deploy.ymlCommon causes
Middle workflow does not re-forward secrets
Each call boundary must explicitly forward secrets; inherit at the top does not cascade automatically.
Named secrets not re-declared
If you pass named secrets, every level must declare and pass them through.
How to fix it
Forward secrets at every nesting level
- In the middle reusable workflow, add secrets: inherit on its call to the deeper workflow.
- Repeat at each level of the chain.
.github/workflows/middle.yml
# middle.yml
jobs:
go:
uses: ./.github/workflows/deploy.yml
secrets: inheritPass named secrets explicitly through the chain
- Declare the secrets under on.workflow_call.secrets in each callee.
- Forward them by name in each uses call instead of relying on inherit.
How to prevent it
- Treat each reusable-workflow boundary as a fresh secrets scope.
- Add secrets: inherit (or named secrets) at every level of a chain.
Related guides
GitHub Actions Reusable Workflow Secrets Empty Without secrets: inheritFix GitHub Actions reusable-workflow secrets arriving empty - the caller must forward each secret explicitly…
GitHub Actions Reusable Workflow "secret not defined" - Declare in workflow_callFix GitHub Actions reusable workflow secret errors - passing a secret the called workflow never declared unde…
GitHub Actions "nesting level too deep" - Reusable Workflow Nesting LimitFix GitHub Actions reusable workflow nesting errors - calling reusable workflows more than the allowed levels…