참고 항목
Copilot 코딩 에이전트 is in 공개 미리 보기 and subject to change.
Copilot 코딩 에이전트에 대한 자세한 내용은 Copilot에 작업 할당 정보을(를) 참조하세요.
Copilot 코딩 에이전트의 개발 환경 사용자 지정 정보
작업을 수행하는 동안 Copilot은 GitHub Actions로 구동되는 자체 임시 개발 환경에 액세스할 수 있습니다. Copilot은 사용자의 코드를 살펴보고, 필요한 부분을 변경하고, 자동화된 테스트 및 Linter를 실행하는 등의 작업을 진행할 수 있습니다.
다음을 통해 Copilot의 환경을 사용자 지정할 수 있습니다.
- Copilot의 환경에 도구 또는 종속성을 사전 설치합니다.
- 표준 GitHub에서 호스팅된 GitHub Actions 실행기에서 대형 러너로 업그레이드합니다.
- Git LFS(대형 파일 스토리지)를 사용하도록 설정
- 에이전트의 방화벽을 사용하지 않도록 설정하거나 사용자 지정합니다.
Copilot의 환경에 도구 또는 종속성 사전 설치
임시 개발 환경에서 Copilot은 프로젝트를 빌드하거나 컴파일할 수 있고, 자동화된 테스트, Linter, 기타 도구를 실행할 수 있습니다. 이러한 작업을 수행하려면 프로젝트의 종속성을 설치해야 합니다.
Copilot은 시행착오를 통해 종속성을 스스로 발견하고 설치할 수 있지만, LLM(대규모 언어 모델)의 비결정적인 특성 때문에 이 과정이 느리거나 신뢰할 수 없을 수 있습니다. 경우에 따라 종속성을 다운로드할 수 없는 경우도 있습니다(예: 비공개 종속성인 경우).
대신, 리포지토리 내의 .github/workflows/copilot-setup-steps.yml
에 특별한 GitHub Actions 워크플로 파일을 만들어 에이전트가 시작되기 전에 Copilot의 환경을 미리 구성할 수 있습니다.
copilot-setup-steps.yml
파일은 일반적인 GitHub Actions 워크플로 파일처럼 보이지만, 반드시 단일 copilot-setup-steps
작업을 포함해야 합니다. 이 작업은 Copilot이 작업을 시작하기 전에 GitHub Actions에서 실행됩니다. GitHub Actions 워크플로 파일에 대한 자세한 내용은 GitHub Actions에 대한 워크플로 구문을(를) 참조하세요.
다음은 프로젝트를 복제하고, Node.js를 설치하고, 프로젝트의 종속성을 다운로드하고 캐시하는 TypeScript 프로젝트에 대한 copilot-setup-steps.yml
파일의 간단한 예입니다. 프로젝트의 언어 및 종속성에 맞게 사용자 지정해야 합니다.
name: "Copilot Setup Steps" # Automatically run the setup steps when they are changed to allow for easy validation, and # allow manual testing through the repository's "Actions" tab on: workflow_dispatch: push: paths: - .github/workflows/copilot-setup-steps.yml pull_request: paths: - .github/workflows/copilot-setup-steps.yml jobs: # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. copilot-setup-steps: runs-on: ubuntu-latest # Set the permissions to the lowest permissions possible needed for your steps. # Copilot will be given its own token for its operations. permissions: # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete. contents: read # You can define any steps you want, and they will run before the agent starts. # If you do not check out your code, Copilot will do this for you. steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "20" cache: "npm" - name: Install JavaScript dependencies run: npm ci
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
contents: read
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install JavaScript dependencies
run: npm ci
copilot-setup-steps.yml
파일에서 copilot-setup-steps
작업의 다음의 설정만 사용자 지정할 수 있습니다. 다른 설정을 사용자 지정하려고 하면 변경 내용이 무시됩니다.
steps
(위의 내용 참조)permissions
(위의 내용 참조)runs-on
(아래 내용 참조)container
services
snapshot
timeout-minutes
(최댓값:59
)
이러한 옵션에 대한 자세한 내용은 GitHub Actions에 대한 워크플로 구문을(를) 참조하세요.
copilot-setup-steps.yml
파일이 변경될 때 자동으로 일반 GitHub Actions 워크플로로 실행되므로 파일이 성공적으로 실행되는지 확인할 수 있습니다. 파일을 만들거나 수정하는 끌어오기 요청의 다른 검사와 함께 표시됩니다.
yml 파일을 기본 분기에 병합한 후에는 언제든지 리포지토리의 Actions 탭에서 워크플로를 수동으로 실행하여 모든 것이 예상대로 작동하는지 확인할 수 있습니다. 자세한 내용은 워크플로 수동 실행을(를) 참조하세요.
대형 GitHub 호스팅 GitHub Actions 러너로 업그레이드
기본적으로 Copilot은 제한된 리소스가 있는 표준 GitHub Actions 러너에서 작업합니다.
대신, 더 많은 RAM, CPU, 디스크 공간, 고급 네트워킹 제어 등의 고급 기능을 갖춘 대형 러너를 사용하도록 선택할 수 있습니다. 성능이 저하되는 경우(예: 종속성을 다운로드하거나 테스트를 실행하는 경우) 대형 러너로 업그레이드할 수 있습니다. 자세한 내용은 대규모 실행기 정보을(를) 참조하세요.
Copilot에서 대형 러너를 사용하려면 먼저 하나 이상의 대형 러너를 추가하고 리포지토리에서 이를 사용하도록 구성해야 합니다. 대형 실행기 관리하기을(를) 참조하세요. 이 작업을 수행한 후에는 copilot-setup-steps.yml
파일을 사용하여 Copilot에 대형 러너를 사용하도록 지시할 수 있습니다.
대형 러너를 사용하려면 copilot-setup-steps
작업의 runs-on
단계를 대형 러너에서 Copilot을 사용할 레이블 및/또는 그룹으로 설정합니다. runs-on
을 사용하여 대형 러너를 지정하는 방법에 대한 자세한 내용은 더 큰 실행기에서 작업 실행을(를) 참조하세요.
# ...
jobs:
copilot-setup-steps:
runs-on: ubuntu-4-core
# ...
참고 항목
- Copilot 코딩 에이전트는 Ubuntu x64 Linux 러너와만 호환됩니다. Windows, macOS 또는 기타 운영 체제의 러너는 지원되지 않습니다.
- 자체 호스팅 GitHub Actions 러너는 지원되지 않습니다.
Git LFS(대형 파일 스토리지)를 사용하도록 설정
Git LFS(대형 파일 스토리지)를 사용하여 리포지토리에 큰 파일을 저장하는 경우 Copilot의 환경을 사용자 지정하여 Git LFS를 설치하고 LFS 개체를 가져와야 합니다.
Git LFS를 사용하도록 설정하려면 lfs
옵션을 true
로 설정하여 copilot-setup-steps
작업에 actions/checkout
단계를 추가합니다.
# ... jobs: copilot-setup-steps: runs-on: ubuntu-latest permissions: contents: read # for actions/checkout steps: - uses: actions/checkout@v4 with: lfs: true
# ...
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout
steps:
- uses: actions/checkout@v4
with:
lfs: true