알림: 맞춤 설정 예제에 대한 구체적인 내용은 고객의 요구에 따라 사용자에게 맞춘 콘텐츠를 제공합니다.
아래 예시는 actions.instructions.md 필드를 활용하여 리포지토리 내의 applyTo 파일에 한정하여 적용되는 경로 기반 GitHub Actions 설정 파일을 보여줍니다. 경로 특정 지침 파일에 대한 자세한 내용은 GitHub Copilot 대한 리포지토리 사용자 지정 지침 추가을(를) 참조하세요.
---
applyTo: ".github/workflows/**/*.yml"
---
When generating or improving GitHub Actions workflows:
## Security First
- Use GitHub secrets for sensitive data, never hardcode credentials
- Pin third-party actions to specific commits by using the SHA value (e.g., `- uses: owner/some-action@a824008085750b8e136effc585c3cd6082bd575f`)
- Configure minimal permissions for GITHUB_TOKEN required for the workflow
## Performance Essentials
- Cache dependencies with `actions/cache` or built-in cache options
- Add `timeout-minutes` to prevent hung workflows
- Use matrix strategies for multi-environment testing
## Best Practices
- Use descriptive names for workflows, jobs, and steps
- Include appropriate triggers: `push`, `pull_request`, `workflow_dispatch`
- Add `if: always()` for cleanup steps that must run regardless of failure
## Example Pattern
```yaml
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm test
```
---
applyTo: ".github/workflows/**/*.yml"
---
When generating or improving GitHub Actions workflows:
## Security First
- Use GitHub secrets for sensitive data, never hardcode credentials
- Pin third-party actions to specific commits by using the SHA value (e.g., `- uses: owner/some-action@a824008085750b8e136effc585c3cd6082bd575f`)
- Configure minimal permissions for GITHUB_TOKEN required for the workflow
## Performance Essentials
- Cache dependencies with `actions/cache` or built-in cache options
- Add `timeout-minutes` to prevent hung workflows
- Use matrix strategies for multi-environment testing
## Best Practices
- Use descriptive names for workflows, jobs, and steps
- Include appropriate triggers: `push`, `pull_request`, `workflow_dispatch`
- Add `if: always()` for cleanup steps that must run regardless of failure
## Example Pattern
```yaml
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm test
```
추가 학습에 대한 지침을 따르려면 ## 추가 참고 자료
-
[AUTOTITLE](/copilot/concepts/response-customization) - GitHub Copilot의 응답 사용자 지정 개요 -
[AUTOTITLE](/copilot/how-tos/configure-custom-instructions) - 사용자 지정 지침을 구성하는 방법 -
[멋진 GitHub Copilot 사용자 지정](https://github.com/github/awesome-copilot/blob/main/README.md) - 특정 언어 및 시나리오의 커뮤니티 기여 사용자 지정 지침 및 기타 사용자 지정 리포지토리을 참조하십시오.