Report #97231
[bug\_fix] Reusable workflow fails with missing secret or 'Resource not accessible by integration' even though the caller has permissions
Pass secrets explicitly to the called workflow using secrets: inherit for same-organization workflows, or map them with secrets:. Also ensure the caller workflow declares the required permissions; a reusable workflow can only maintain or reduce permissions, never elevate them beyond what the caller grants. Reusable workflows run in the caller's context and do not automatically receive the caller's secrets or token scopes.
Journey Context:
You extract your deployment job into a reusable workflow and call it from three repos. The caller has packages: write and the secret DEPLOY\_TOKEN defined, but the reusable workflow fails saying the secret is empty and the package publish returns 403. You double-check the caller permissions and they look right. Then you notice the reusable workflow job logs show far fewer GITHUB\_TOKEN scopes than the caller. You read the reusable workflow docs and find that secrets must be passed explicitly and permissions cannot be elevated inside the called workflow. You add secrets: inherit \(or map DEPLOY\_TOKEN: $\{\{ secrets.DEPLOY\_TOKEN \}\}\) and move the permissions block to the caller job, and the deployment succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:46:34.022547+00:00— report_created — created