Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 6.4 KB

File metadata and controls

91 lines (66 loc) · 6.4 KB
title Configuring runners for GitHub Copilot code review
shortTitle Configure runners
intro Use self-hosted runners or larger {% data variables.product.prodname_dotcom %}-hosted runners for {% data variables.copilot.copilot_code-review_short %}.
allowTitleToDifferFromFilename true
redirect_from
/copilot/how-tos/use-copilot-agents/request-a-code-review/configure-self-hosted-runners
/copilot/how-tos/use-copilot-agents/request-a-code-review/configure-runners
versions
feature
copilot
contentType how-tos
category
Author and optimize with Copilot

About {% data variables.product.prodname_actions %} usage for code review tools

{% data reusables.copilot.code-review.code-review-actions-usage %} Organizations in this situation can use self-hosted runners.

You can also upgrade to larger {% data variables.product.prodname_dotcom %}-hosted runners for better performance.

Configure self-hosted runners for code review

Run {% data variables.copilot.copilot_code-review_short %} using self-hosted {% data variables.product.prodname_actions %} runners with ARC (Actions Runner Controller). You must first set up ARC-managed scale sets in your environment. For more information on ARC, see AUTOTITLE.

Warning

ARC is the only officially supported solution for self-hosting {% data variables.copilot.copilot_code-review_short %}. For security reasons, do not use non-ARC self-hosted runners.

{% data variables.copilot.copilot_code-review_short %} is only compatible with Ubuntu x64 Linux runners.

To configure self-hosted runners for {% data variables.copilot.copilot_code-review_short %}:

  1. Configure network security controls for your {% data variables.product.prodname_actions %} runners to ensure that {% data variables.copilot.copilot_code-review_short %} does not have open access to your network or the public internet.

    You must configure your firewall to allow connections to the standard hosts required for {% data variables.product.prodname_actions %} self-hosted runners, plus the following hosts:

    • api.githubcopilot.com
    • uploads.github.com
    • user-images.githubusercontent.com
  2. In your copilot-setup-steps.yml file, set the runs-on attribute to your ARC-managed scale set name. For more information, see AUTOTITLE.

    # ...
    
    jobs:
      copilot-setup-steps:
        runs-on: arc-scale-set-name
        # ...

Upgrade to larger {% data variables.product.prodname_dotcom %}-hosted {% data variables.product.prodname_actions %} runners

By default, {% data variables.copilot.copilot_code-review_short %} runs on a standard {% data variables.product.prodname_actions %} runner. Larger runners provide better performance (CPU and memory), more disk space, and advanced features like Azure private networking. See AUTOTITLE.

Note

Usage of larger {% data variables.product.prodname_dotcom %}-hosted runners is billed at a higher per-minute rate. For more information, see AUTOTITLE.

  1. Set up larger runners for your organization. See AUTOTITLE.

  2. If you are using larger runners with Azure private networking, configure your Azure private network to allow outbound access to the following hosts:

    • api.githubcopilot.com
    • uploads.github.com
    • user-images.githubusercontent.com
  3. In your copilot-setup-steps.yml file, set the runs-on attribute to the label for the larger runners you want {% data variables.copilot.copilot_code-review_short %} to use. See AUTOTITLE.

    # ...
    
    jobs:
      copilot-setup-steps:
        runs-on: ubuntu-4-core
        # ...

Configure runners at the organization level

Organization owners can set a default runner type for {% data variables.copilot.copilot_code-review_short %} and {% data variables.copilot.copilot_cloud_agent %} across all repositories in the organization, and control whether individual repositories can override this default.

Note

The organization-level runner type applies to both {% data variables.copilot.copilot_code-review_short %} and {% data variables.copilot.copilot_cloud_agent %}. Repositories can still override the organization default using copilot-setup-steps.yml unless you disable Allow repositories to customize the runner type. For more information, see AUTOTITLE.

This is useful if your organization requires all code reviews and {% data variables.copilot.copilot_cloud_agent_short %} tasks to run on specific runners, for example, to use larger runners for better performance or self-hosted runners that have access to internal resources.

{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %}

  1. In the sidebar, under "Code, planning, and automation," click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}, and then click Runner type.
  2. Next to "Runner type configuration," click {% octicon "pencil" aria-label="Edit" %}.
  3. In the "Edit runner type" dialog, select the runner type to use by default across your organization, then click Save runner selection.
    • Standard {% data variables.product.prodname_dotcom %} runner: {% data variables.copilot.copilot_code-review_short %} and {% data variables.copilot.copilot_cloud_agent %} will use the standard {% data variables.product.prodname_dotcom %}-hosted runner.
    • Labeled runner: {% data variables.copilot.copilot_code-review_short %} and {% data variables.copilot.copilot_cloud_agent %} will use a runner matching the label you specify.
  4. Optionally, to prevent individual repositories from overriding the organization-level runner configuration using their copilot-setup-steps.yml file, disable Allow repositories to customize the runner type.