Skip to content

Commit 9055df1

Browse files
Add Copilot coding agent environment setup workflow (#373)
Configures the GitHub Copilot coding agent development environment to enable AI-assisted coding in this repository. ## Changes - **Created `.github/workflows/copilot-setup-steps.yml`** - Job named `copilot-setup-steps` (required by Copilot) - Minimal permissions: `contents: read` - Triggers on workflow_dispatch, push/PR to the workflow file itself - **Reused existing CI components** - `actions/checkout@v4` from dotnetBuild.yml - `actions/setup-dotnet@v4` with `global-json-file: "./global.json"` from dotnetBuild.yml - `dotnet restore` command from dotnetBuild.yml The workflow prepares a .NET 8.0 environment with restored dependencies before Copilot begins work, following the [official GitHub documentation pattern](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment). <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Customizing the development environment for GitHub Copilot coding agent</issue_title> > <issue_description>https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment > > Sample: > ``` > 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@v5 > > - name: Set up Node.js > uses: actions/setup-node@v4 > with: > node-version: "20" > cache: "npm" > > - name: Install JavaScript dependencies > run: npm ci > > ``` > > Reuse/share components from our existing CI pipelines where we can</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #372 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
1 parent d2f504d commit 9055df1

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
# 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.
23+
contents: read
24+
25+
# You can define any steps you want, and they will run before the agent starts.
26+
# If you do not check out your code, Copilot will do this for you.
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup .NET
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
global-json-file: "./global.json"
35+
36+
- name: Restore dependencies
37+
run: dotnet restore

0 commit comments

Comments
 (0)