Interview Prep/GitHub Actions/Workflow Anatomy & Execution Model

What is `$GITHUB_EVENT_PATH` and how do you use it?

IntermediateConceptWorkflow Anatomy & Execution Model
Answer

It is the path to a JSON file holding the full webhook payload of the triggering event, the same data as github.event. Useful for scripts that need deep fields without expression gymnastics:

jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH"

Treat every string field in it (titles, branch names, commit messages) as untrusted input.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflow Anatomy & Execution Model