{"meta":{"title":"Customizing GitHub-hosted runners","intro":"You can install additional software on GitHub-hosted runners as a part of your workflow.","product":"GitHub Actions","breadcrumbs":[{"href":"/en/actions","title":"GitHub Actions"},{"href":"/en/actions/how-tos","title":"How-tos"},{"href":"/en/actions/how-tos/manage-runners","title":"Manage runners"},{"href":"/en/actions/how-tos/manage-runners/github-hosted-runners","title":"GitHub-hosted runners"},{"href":"/en/actions/how-tos/manage-runners/github-hosted-runners/customize-runners","title":"Customize runners"}],"documentType":"article"},"body":"# Customizing GitHub-hosted runners\n\nYou can install additional software on GitHub-hosted runners as a part of your workflow.\n\nIf you require additional software packages on GitHub-hosted runners, you can create a job that installs the packages as part of your workflow.\n\nTo see which packages are already installed by default, see [GitHub-hosted runners](/en/actions/concepts/runners/github-hosted-runners#preinstalled-software-for-github-owned-images).\n\nThis guide demonstrates how to create a job that installs additional software on a GitHub-hosted runner.\n\n## Installing software on Ubuntu runners\n\nThe following example demonstrates how to install an `apt` package as part of a job.\n\n```yaml\nname: Build on Ubuntu\non: push\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check out repository code\n        uses: actions/checkout@v6\n      - name: Install jq tool\n        run: |\n          sudo apt-get update\n          sudo apt-get install jq\n```\n\n> \\[!NOTE]\n> Always run `sudo apt-get update` before installing a package. In case the `apt` index is stale, this command fetches and re-indexes any available packages, which helps prevent package installation failures.\n\n## Installing software on macOS runners\n\nThe following example demonstrates how to install Brew packages and casks as part of a job.\n\n```yaml\nname: Build on macOS\non: push\n\njobs:\n  build:\n    runs-on: macos-latest\n    steps:\n      - name: Check out repository code\n        uses: actions/checkout@v6\n      - name: Install GitHub CLI\n        run: |\n          brew update\n          brew install gh\n      - name: Install Microsoft Edge\n        run: |\n          brew update\n          brew install --cask microsoft-edge\n```\n\n## Installing software on Windows runners\n\nThe following example demonstrates how to use [Chocolatey](https://community.chocolatey.org/packages) to install the GitHub CLI as part of a job.\n\n```yaml\nname: Build on Windows\non: push\njobs:\n  build:\n    runs-on: windows-latest\n    steps:\n      - run: choco install gh\n      - run: gh version\n```"}