Skip to main content

이 버전의 GitHub Enterprise Server는 2023-09-25. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 성능 향상, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.

작업에 대한 실행기 선택

워크플로에서 작업을 처리할 컴퓨터 유형을 정의합니다.

Note: GitHub-hosted runners are not currently supported on GitHub Enterprise Server. You can see more information about planned future support on the GitHub public roadmap.


Use jobs.<job_id>.runs-on to define the type of machine to run the job on.

  • The destination machine can be a self-hosted runner.

  • You can target runners based on the labels assigned to them.

  • You can provide runs-on as:

    • a single string
    • a single variable containing a string
    • an array of strings, variables containing strings, or a combination of both
    • a key: value pair using the group or label keys
  • If you specify an array of strings or variables, your workflow will execute on any runner that matches all of the specified runs-on values. For example, here the job will only run on a self-hosted runner that has the labels linux, x64, and gpu:

    runs-on: [self-hosted, linux, x64, gpu]

    For more information, see "Choosing self-hosted runners."

  • You can mix strings and variables in an array. For example:

            required: true
            type: choice
            - Ubuntu
            - macOS
        runs-on: [self-hosted, "${{ inputs.chosen-os }}"]
        - run: echo Hello world!
  • If you would like to run your workflow on multiple machines, use jobs.<job_id>.strategy.

Note: GitHub-hosted runners are not currently supported on GitHub Enterprise Server. You can see more information about planned future support on the GitHub public roadmap.

Choosing GitHub-hosted runners

If you use a GitHub-hosted runner, each job runs in a fresh instance of a runner image specified by runs-on.

Available GitHub-hosted runner types are:

Virtual Machine Processor (CPU) Memory (RAM) Storage (SSD) OS (YAML workflow label) Notes
Linux 2 7 GB 14 GB ubuntu-latest, ubuntu-22.04, ubuntu-20.04 The ubuntu-latest label currently uses the Ubuntu 22.04 runner image.
Windows 2 7 GB 14 GB windows-latest, windows-2022, windows-2019 The windows-latest label currently uses the Windows 2022 runner image.
macOS 3 14 GB 14 GB macos-latest, macos-12, macos-11 The macos-latest workflow label currently uses the macOS 12 runner image.
macOS 4 14 GB 14 GB macos-13 [Beta] N/A

Note: The -latest runner images are the latest stable images that GitHub provides, and might not be the most recent version of the operating system available from the operating system vendor.

Warning: Beta and Deprecated Images are provided "as-is", "with all faults" and "as available" and are excluded from the service level agreement and warranty. Beta Images may not be covered by customer support.

Example: Specifying an operating system

runs-on: ubuntu-latest

For more information, see "Using GitHub-hosted runners."

Choosing self-hosted runners

To specify a self-hosted runner for your job, configure runs-on in your workflow file with self-hosted runner labels.

All self-hosted runners have the self-hosted label. Using only this label will select any self-hosted runner. To select runners that meet certain criteria, such as operating system or architecture, we recommend providing an array of labels that begins with self-hosted (this must be listed first) and then includes additional labels as needed. When you specify an array of labels, jobs will be queued on runners that have all the labels that you specify.

Although the self-hosted label is not required, we strongly recommend specifying it when using self-hosted runners to ensure that your job does not unintentionally specify any current or future GitHub-hosted runners.

Example: Using labels for runner selection

runs-on: [self-hosted, linux]

For more information, see "About self-hosted runners" and "Using self-hosted runners in a workflow."