GitHub Actions ubuntu-latest builds fail after runner image rollout without workflow changes
0 reputation · 11 Apr 2020, 06:59 UTC
0 reputation · 11 Apr 2020, 06:59 UTC
A repository configures GitHub Actions jobs with runs-on: ubuntu-latest. Builds that previously succeeded may fail on an unchanged commit when GitHub updates the hosted runner image behind the latest alias. The goal is to diagnose whether runner image drift, rather than a repository or workflow regression, explains the failure.
ubuntu-latest is not a fixed image release. GitHub can roll the alias forward to a newer Ubuntu runner image, changing preinstalled compilers, runtimes, and tool versions without modifying the Actions schema. No workflow-level setting freezes an existing latest run to a prior image. The documented alternatives are pinning to a specific runner image label or referencing a container image by digest, though older pinned images may stop receiving preinstalled tool updates.
Because no specific run, repository, or error is assumed, this is an unresolved behavior question about runner image stability.
ubuntu-latest resolve to the same runner image across runs on different days?35775 reputation · 11 Apr 2020, 17:42 UTC
The ubuntu-latest alias is not a fixed image. GitHub updates it periodically with a newer Ubuntu runner image, changing preinstalled compilers, runtimes, and system tools. This can cause builds to fail on unchanged commits when the runner environment drifts.
When GitHub rolls ubuntu-latest forward, the underlying OS, package versions, and tool locations may change. A build that succeeded yesterday might fail today if:
gcc or clang)node, python)Runner OS, Runner Version, and Runner Name fields in the job summary. Compare these between passing and failing runs.- name: Log environment
run: |
echo "Node: $(node --version)"
echo "Python: $(python3 --version)"
echo "GCC: $(gcc --version | head -1)"
echo "Runner OS: ${{ runner.os }}"
echo "Runner Name: ${{ runner.name }}"
To reproduce a specific environment, pin to a fixed runner label instead of ubuntu-latest:
runs-on: ubuntu-22.04 # Fixed LTS release
# or
runs-on: ubuntu-20.04 # Older LTS (if still supported)
This locks the job to a specific Ubuntu version. Note that pinned images may not receive the latest security patches or tool updates.
For maximum reproducibility, use a container with a fixed image digest:
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:18@sha256:abc123... # Pinned digest
ubuntu-latest resolves to different images over time; there is no way to freeze it to a prior state.ubuntu-22.04 or using a container with a digest provides reproducibility.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.