Interview Prep/GitHub Actions/Custom Actions & Reusable Workflows

What does `secrets: inherit` do, and when should you avoid it?

IntermediateConceptCustom Actions & Reusable Workflows
Answer

It passes all secrets the caller can access (repo and org) to the called workflow, without listing them. Convenient within one repo or a trusted org. Avoid it when calling a workflow owned by another team or a third party, since it hands over every secret including unrelated ones. Pass named secrets explicitly instead, so the interface is documented and minimal. inherit works only within the same org or enterprise.

All GitHub Actions questions Roadmap: GitHub Actions

More on Custom Actions & Reusable Workflows