What does 'ubuntu-latest' resolve to when used as a runs-on value for GitHub-hosted runners?
Select an answer to reveal the explanation.
Short Explanation and Infographic
ubuntu-latest is a moving target — GitHub controls which specific version it maps to, and they do update it with advance notice.
Full explanation below image
Full Explanation
'ubuntu-latest' is an alias managed by GitHub that points to a specific Ubuntu version (e.g., Ubuntu 22.04 or 24.04). GitHub periodically updates the alias to a newer LTS version with advance notice to allow workflow owners to adapt. The alias is not guaranteed to always be the newest LTS — GitHub decides when to migrate. For reproducible builds, pin to a specific version like 'ubuntu-22.04'. The GitHub-hosted runners use standard Ubuntu with pre-installed tools like Node.js, Python, Docker, and many others from the runner-images repository.