Coming from ubuntu-latest
Most jobs move by changing runs-on: ubuntu-latest to runs-on: backmesh-4.
These are the differences that can break one, and what to do about each.
On ubuntu-latest |
On backmesh | Fix |
|---|---|---|
| Ubuntu 26.04 | Ubuntu 24.04, matching GitHub’s ubuntu-24.04 |
Compare against ubuntu-24.04, or run the job in a container: of the release you need. |
| Go, Rust, Ruby, .NET, PHP, other Python versions, Firefox, Android SDK and more are preinstalled | The image has the apt packages, Node 22, and Python 3 | Add the setup action: actions/setup-go, dtolnay/rust-toolchain, ruby/setup-ruby, actions/setup-dotnet, shivammathur/setup-php, actions/setup-python, browser-actions/setup-firefox, android-actions/setup-android. |
Java with Maven and Gradle (JAVA_HOME set) |
Not preinstalled yet | actions/setup-java@v6 with distribution: temurin and java-version: 17; add gradle/actions/setup-gradle@v6 for Gradle. mvn installs on first use. |
PowerShell (pwsh) |
Not preinstalled yet | PSModule/install-powershell@v1. |
Google Chrome and ChromeDriver (CHROME_BIN, CHROMEWEBDRIVER) |
Not preinstalled yet | browser-actions/setup-chrome@v2 with install-chromedriver: true and install-dependencies: true. |
Every tool is on PATH in every shell |
A missing command installs on first use only in a bash run: step, at Ubuntu’s archive version, without the environment variables GitHub sets |
Use the setup action, or install the package in its own step: sudo apt-get install -y <package>. |
systemd runs services: sudo systemctl start postgresql |
There’s no systemd | Run the database as a job services: container, or with docker run -d. |
/dev/kvm after a udev rule step |
/dev/kvm comes with the KVM labels |
Use runs-on: backmesh-kvm-4 and drop the udev step. |
docker run -v /home/runner/... works |
Docker is the VM’s, and the job’s files are under /workspace |
Use $GITHUB_WORKSPACE, $RUNNER_TEMP or $HOME in docker run -v, not a literal /home/runner path. |
sudo sysctl, sudo mount and FUSE work |
The job runs in a container without those rights | Run the command in a privileged container on the VM’s Docker: docker run --rm --privileged alpine sysctl -w vm.max_map_count=262144. |
| Chrome starts with its sandbox | Chrome’s sandbox can’t start in the job’s container | Pass --no-sandbox, as in Puppeteer’s args: ['--no-sandbox']. |
| A swap file | No swap | Use a larger label for jobs that need it; drop swapoff and swap-file steps. |
RUNNER_ENVIRONMENT=github-hosted |
RUNNER_ENVIRONMENT=self-hosted |
Check actions that branch on it, such as ones that only run on GitHub-hosted runners. |
| Cache, artifact and image-push traffic is free | It leaves your cloud as egress, which your cloud bills | Cache what saves the most time; push images to a registry in the same cloud and region. |
| A job runs to the end | A spot reclaim can fail a job, and backmesh reruns the run’s failed jobs | Run deploys and other jobs that mustn’t repeat with runs-on: [backmesh-4, backmesh-noretry], or on an on-demand label such as backmesh-od-4. |
sudo apt-get install works without an apt-get update first: the first apt
command in a job fetches the package lists.