ドキュメントには頻繁に更新が加えられ、その都度公開されています。本ページの翻訳はまだ未完成な部分があることをご了承ください。最新の情報については、英語のドキュメンテーションをご参照ください。本ページの翻訳に問題がある場合はこちらまでご連絡ください。

Specifications for GitHub-hosted runners

GitHub offers hosted virtual machines to run workflows. The virtual machine contains an environment of tools, packages, and settings available for GitHub Actions to use.

GitHub ActionsはGitHub Free、GitHub Pro、GitHub FreeのOrganization、GitHub Team、GitHub Enterprise Cloud、GitHub Oneで利用できます。 GitHub Actions is not available for private repositories owned by accounts using legacy per-repository plans. 詳しい情報については「GitHubの製品」を参照してください。

ここには以下の内容があります:

Did this doc help you?

About GitHub-hosted runners

A GitHub-hosted runner is a virtual machine hosted by GitHub with the GitHub Actions runner application installed. GitHub offers runners with Linux, Windows, and macOS operating systems.

When you use a GitHub-hosted runner, machine maintenance and upgrades are taken care of for you. You can run workflows directly on the virtual machine or in a Docker container.

You can specify the runner type for each job in a workflow. Each job in a workflow executes in a fresh instance of the virtual machine. All steps in the job execute in the same instance of the virtual machine, allowing the actions in that job to share information using the filesystem.

GitHub Actionsランナーアプリケーションはオープンソースです。 runnerリポジトリに貢献し、Issueを登録できます。

Cloud hosts for GitHub-hosted runners

GitHub hosts Linux and Windows runners on Standard_DS2_v2 virtual machines in Microsoft Azure with the GitHub Actions runner application installed. The GitHub-hosted runner application is a fork of the Azure Pipelines Agent. Inbound ICMP packets are blocked for all Azure virtual machines, so ping or traceroute commands might not work. For more information about the Standard_DS2_v2 machine resources, see "Dv2 and DSv2-series" in the Microsoft Azure documentation.

GitHub uses MacStadium to host the macOS runners.

Administrative privileges of GitHub-hosted runners

The Linux and macOS virtual machines both run using passwordless sudo. When you need to execute commands or install tools that require more privileges than the current user, you can use sudo without needing to provide a password. For more information, see the "Sudo Manual."

Windows virtual machines are configured to run as administrators with User Account Control (UAC) disabled. For more information, see "How User Account Control works" in the Windows documentation.

Supported runners and hardware resources

Each virtual machine has the same hardware resources available.

  • 2-core CPU
  • 7 GB of RAM memory
  • 14 GB of SSD disk space
仮想環境YAMLのワークフローラベル
Windows Server 2019windows-latest or windows-2019
Ubuntu 20.04ubuntu-20.04
Ubuntu 18.04ubuntu-latestまたはubuntu-18.04
Ubuntu 16.04ubuntu-16.04
macOS Catalina 10.15macos-latestもしくはmacos-10.15

ノート: Ubuntu 20.04仮想環境は、現在プレビューでのみ提供されています。 YAMLワークフローラベルのubuntu-latestは、引き続きUbuntu 18.04仮想環境を利用します。

Workflow logs list the runner used to run a job. For more information, see "Viewing workflow run history."

Supported software

The software tools included in GitHub-hosted runners are updated weekly. For the latest list of included tools for each runner operating system, see the links below:

ノート: Ubuntu 20.04仮想環境は、現在プレビューでのみ提供されています。 YAMLワークフローラベルのubuntu-latestは、引き続きUbuntu 18.04仮想環境を利用します。

GitHub-hosted runners include the operating system's default built-in tools, in addition to the packages listed in the above references. For example, Ubuntu and macOS runners include grep, find, and which, among other default tools.

Workflow logs include a link to the preinstalled tools on the runner. For more information, see "Viewing workflow run history."

If there is a tool that you'd like to request, please open an issue at actions/virtual-environments.

IP addresses

Note: If you use an IP address allow list for your GitHub organization or enterprise account, you cannot use GitHub-hosted runners and must instead use self-hosted runners. For more information, see "About self-hosted runners."

Windows and Ubuntu runners are hosted in Azure and have the same IP address ranges as Azure Data centers. Currently, all Windows and Ubuntu GitHub-hosted runners are in the following Azure regions:

  • East US (eastus)
  • East US 2 (eastus2)
  • West US 2 (westus2)
  • Central US (centralus)
  • South Central US (southcentralus)

Microsoft updates the Azure IP address ranges weekly in a JSON file that you can download from the Azure IP Ranges and Service Tags - Public Cloud website. You can use this range of IP addresses if you require an allow-list to prevent unauthorized access to your internal resources.

The JSON file contains an array called values. Inside that array, you can find the supported IP addresses in an object with a name and id of the Azure region, for example "AzureCloud.eastus2".

You can find the supported IP address ranges in the "addressPrefixes" object. This is a condensed example of the JSON file.

{
  "changeNumber": 84,
  "cloud": "Public",
  "values": [
    {
      "name": "AzureCloud.eastus2",
      "id": "AzureCloud.eastus2",
      "properties": {
        "changeNumber": 33,
        "region": "eastus2",
        "platform": "Azure",
        "systemService": "",
        "addressPrefixes": [
          "13.68.0.0/17",
          "13.77.64.0/18",
          "13.104.147.0/25",
          ...
        ]
      }
    }
  ]
}

File systems

GitHub executes actions and shell commands in specific directories on the virtual machine. The file paths on virtual machines are not static. Use the environment variables GitHub provides to construct file paths for the home, workspace, and workflow directories.

DirectoryEnvironment variableDescription
homeHOMEContains user-related data. For example, this directory could contain credentials from a login attempt.
workspaceGITHUB_WORKSPACEActions and shell commands execute in this directory. An action can modify the contents of this directory, which subsequent actions can access.
workflow/event.jsonGITHUB_EVENT_PATHThe POST payload of the webhook event that triggered the workflow. GitHub rewrites this each time an action executes to isolate file content between actions.

For a list of the environment variables GitHub creates for each workflow, see "Using environment variables."

Docker container filesystem

Actions that run in Docker containers have static directories under the /github path. However, we strongly recommend using the default environment variables to construct file paths in Docker containers.

GitHub reserves the /github path prefix and creates three directories for actions.

  • /github/home
  • /github/workspace - ノート: GitHub ActionsはデフォルトのDockerユーザ(root)で実行しなければなりません。 DockerfileでUSER命令が設定されていないことを確認してください。使われていた場合には、GITHUB_WORKSPACEにアクセスできなくなります。
  • /github/workflow

Further reading

Did this doc help you?