Interview Prep/GitHub Actions/Triggers & Events

What is the `workflow_call` event payload, and which `github` context values does a called workflow see?

AdvancedConceptTriggers & Events
Answer

A called workflow runs as part of the caller's run, so github.event_name, github.event, github.sha, github.ref and github.actor are the caller's. github.workflow is the caller's name too, while github.workflow_ref points at the caller and job_workflow_sha (in OIDC claims) identifies the called file. This matters for concurrency groups (use github.workflow carefully to avoid collisions between callers) and for OIDC trust policies that want to pin to a specific reusable workflow via the job_workflow_ref claim.

All GitHub Actions questions Roadmap: GitHub Actions

More on Triggers & Events