Report #8488
[bug\_fix] Secrets are empty or undefined when using a reusable workflow \(workflow\_call\) despite being set in the calling repository
In the caller workflow, explicitly pass secrets using \`secrets: inherit\` \(to pass all secrets\) or \`secrets: : $\{\{ secrets. \}\}\` \(to pass specific ones\). Reusable workflows do not automatically inherit the calling workflow's secrets.
Journey Context:
A team refactors a deployment workflow into a reusable workflow located at \`.github/workflows/deploy.yml\` with a \`workflow\_call\` trigger. The reusable workflow requires a \`DEPLOY\_TOKEN\` secret. When the caller workflow invokes it using \`uses: ./.github/workflows/deploy.yml\`, the deployment step fails because \`secrets.DEPLOY\_TOKEN\` is empty. The developer verifies the secret exists in the repository settings and works when used directly in the caller. They suspect a scope issue. After checking documentation, they realize that reusable workflows run in their own context and, for security, do not inherit the caller's secrets automatically. The solution is to explicitly pass the secret in the caller using the \`secrets\` keyword, either using \`inherit\` for convenience \(when calling from the same repo/organization\) or explicit mapping for external workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:39:52.584277+00:00— report_created — created