GitHub Actions is a powerful automation tool integrated into GitHub, designed to help developers automate their software development workflows. It allows you to build, test, and deploy your code directly from your GitHub repository. By using workflows defined in YAML files, developers can automate tasks such as CI/CD, code linting, and more.
When using GitHub Actions, you might encounter an error message stating 'Unsupported runner OS'. This error typically appears when the workflow attempts to execute on a runner operating system that is not supported by GitHub Actions.
The error message usually looks like this:
Error: Unsupported runner OS
The root cause of this issue is that the workflow file specifies a runner OS that GitHub Actions does not support. GitHub Actions provides a set of predefined virtual environments, each with a specific operating system, such as Ubuntu, Windows, and macOS. If your workflow specifies an OS outside these options, the error will occur.
As of the latest update, GitHub Actions supports the following runner OS options:
ubuntu-latest
ubuntu-22.04
ubuntu-20.04
ubuntu-18.04
windows-latest
windows-2022
windows-2019
macos-latest
macos-12
macos-11
For the most up-to-date list, refer to the GitHub documentation.
To resolve the 'Unsupported runner OS' error, follow these steps:
Open your workflow YAML file, typically located in the .github/workflows
directory of your repository. Look for the runs-on
key, which specifies the runner OS.
Ensure that the runs-on
key is set to one of the supported OS options. For example, if your workflow currently specifies an unsupported OS, update it to a supported one:
runs-on: ubuntu-latest
After updating the workflow file, commit your changes and push them to your GitHub repository:
git add .github/workflows/your-workflow-file.yml
git commit -m "Update runner OS to a supported version"
git push origin main
Navigate to the Actions tab in your GitHub repository and re-run the workflow to verify that the issue is resolved.
By ensuring your workflow specifies a supported runner OS, you can avoid the 'Unsupported runner OS' error and ensure your GitHub Actions workflows run smoothly. Always refer to the GitHub Actions documentation for the latest updates and supported environments.
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo