GitHub Actions reusable workflows do not inherit caller env values

Environment variables set with env in a calling job do not reach a reusable workflow invoked with uses. Only inputs, secrets, and organization or repository variables cross that call boundary, and the calling job cannot declare an env block at all. Developers often expect workflow-level env to carry over, so the empty value they receive can look like a scoping quirk. Attempts to fix this by adding env to the caller or referencing env in with fail with errors that do not mention reusable workflows. The recommended fix is to declare a typed input in the called workflow and pass the value explicitly, or to publish a computed value as a job output and pass that along.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in