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.
More on Workflow Anatomy & Execution Model
Define workflow, run, job, step, action and runner in one line each.BeginnerWhat is the minimum valid workflow file?BeginnerWhere must workflow files live, and does the file extension matter?BeginnerWhich version of the workflow file does GitHub use for a given run?IntermediateWhat does a GitHub-hosted runner give you at the start of a job?BeginnerShould you use `ubuntu-latest` or `ubuntu-24.04`?Beginner