Interview Prep/GitHub Actions/Workflow Anatomy & Execution Model

Should you use `ubuntu-latest` or `ubuntu-24.04`?

BeginnerConceptWorkflow Anatomy & Execution Model
Answer

In production we pin ubuntu-24.04. -latest labels migrate to a new OS version on GitHub's schedule (ubuntu-latest moved from 22.04 to 24.04 in late 2024), which silently changes tool versions, default Python, and package names, and breaks builds on a day nobody touched the repo. Pin the image, and upgrade deliberately with a PR. Also note old images are retired (ubuntu-20.04 was removed in 2025), and jobs targeting retired labels fail.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflow Anatomy & Execution Model