GitHub Actions Ubuntu 26 Migration: Test ubuntu-latest Before It Moves
Prepare GitHub Actions workflows for the Ubuntu 26.04 migration with matrix testing, dependency checks, explicit runner labels, and a controlled rollout.
GitHub Actions now supports Ubuntu 26.04 for production workflows on x64 and Arm64. The larger change arrives next: ubuntu-latest will gradually move from Ubuntu 24.04 to Ubuntu 26.04 between October 19 and November 19, 2026.
If your workflow depends on the contents of the hosted runner image, doing nothing is still a migration decision.
What Is Changing
You can target the new images explicitly:
jobs:
test-x64:
runs-on: ubuntu-26.04
test-arm64:
runs-on: ubuntu-26.04-armDuring the announced migration window, jobs using ubuntu-latest will begin landing on Ubuntu 26.04. The rollout is gradual, so two runs close together may not prove that every job is using the same base image.
The new image includes updated toolchains and removes some previously installed software. Workflows are most exposed when they assume a command exists without installing or pinning it.
Find Hidden Runner Dependencies
Search workflow files for direct command usage and ubuntu-latest:
rg "runs-on:.*ubuntu-latest|apt-get|python|node|java|docker|helm|terraform|pulumi" .github/workflowsReview shell scripts and composite actions too. A reusable workflow may hide the actual runner label or invoke software not declared in the caller.
For each tool, decide who owns its version:
- A setup action such as
actions/setup-nodeoractions/setup-python - Your workflow's package installation step
- A container image pinned by digest or version
- The GitHub-hosted runner image
The last option has the least predictability. Prefer explicit setup when a version affects build output or deployment behavior.
Test Both Images in a Matrix
Add a temporary compatibility workflow:
name: Ubuntu image compatibility
on:
workflow_dispatch:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-26.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm test
- run: npm run buildRun unit, integration, packaging, container, infrastructure, and deployment-dry-run jobs. A successful dependency install does not prove that native extensions, browsers, Docker builds, or deployment CLIs behave identically.
Record the Actual Image
The Set up job section of a workflow run shows the image version and included software link. Add lightweight diagnostics during migration:
- name: Runner diagnostics
run: |
cat /etc/os-release
uname -a
node --version || true
python3 --version || true
docker version || trueRemove noisy diagnostics after the rollout, but preserve the image details in failed-run evidence. “It failed on ubuntu-latest” is incomplete without the actual OS and image release.
Decide Whether to Pin
If testing passes, you can switch directly to ubuntu-26.04 before the rolling migration. That makes the cutover date yours rather than GitHub's.
If testing reveals blockers, temporarily pin:
runs-on: ubuntu-24.04Pinning buys investigation time; it is not a permanent avoidance strategy. Hosted images have support lifecycles, and old images are eventually deprecated. Create an owner and deadline for every temporary pin.
Common Failure Categories
Expect issues from removed preinstalled packages, changed language defaults, native library versions, stricter compiler behavior, browser and driver mismatches, and assumptions about filesystem or service configuration.
Do not repair an image migration by blindly installing “latest” versions. Reproduce the old and new environments, identify the dependency, then pin or update it intentionally.
Containerized jobs may reduce host-tool differences, but the runner still provides Docker, networking, mounts, and orchestration. Test those paths on the new image.
Migration Checklist
Before October 19:
- Inventory
ubuntu-latestacross workflows and reusable workflows. - Run the Ubuntu 24.04/26.04 matrix.
- Compare artifacts, test results, deployment plans, and execution time.
- Fix undeclared dependencies.
- Move passing workflows to
ubuntu-26.04or document a temporary pin. - Monitor GitHub's runner-image announcements through November 19.
For runner strategy beyond hosted images, compare GitHub-hosted, larger, and self-hosted runners.
Sources
Today I Fixed
Short real fixes from production — posted daily
Stay ahead of the curve
Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.
Related Articles
AWS CodePipeline vs GitHub Actions — Which CI/CD Tool to Use? (2026)
AWS CodePipeline and GitHub Actions both automate deployments. But they have very different strengths. Here's an honest comparison with real examples.
AWS CodePipeline vs GitHub Actions vs Jenkins — Which CI/CD for Enterprise 2026
Choosing CI/CD for an enterprise team? AWS CodePipeline, GitHub Actions, and Jenkins each have real trade-offs. Here's an honest breakdown for teams at scale.
Build an AI Code Review Bot with GitHub Actions and Claude API (2026)
Automate code reviews on every PR using Claude AI via GitHub Actions. The bot reviews Dockerfile security, Terraform changes, and general code quality — and posts inline comments.