Interview Prep/GitHub Actions/Workflow Anatomy & Execution Model

What happens, step by step, between `git push` and the first step running?

AdvancedConceptWorkflow Anatomy & Execution Model
Answer
  1. GitHub emits a push event and evaluates every workflow file at the pushed SHA.
  2. For each workflow, on.push filters (branches, tags, paths) are matched against the ref and the changed files (only the first 300 changed files are considered for path filters).
  3. Matching workflows create a run; job-level if expressions that only use available contexts are evaluated; jobs without needs are queued.
  4. Each queued job requests a runner matching runs-on. Hosted: a VM is provisioned. Self-hosted: an idle runner long-polling the broker gets the job message.
  5. The runner receives the job with a freshly minted GITHUB_TOKEN, downloads every referenced action at its resolved ref, then runs the "Set up job" step and your steps in order, streaming logs back.
All GitHub Actions questions Roadmap: GitHub Actions

More on Workflow Anatomy & Execution Model