Commit a07b4b9
Add GitHub Actions workflow for Copilot agent environment setup (#163)
## Overview
This PR adds a new GitHub Actions workflow file
`.github/workflows/copilot-setup-steps.yml` to preconfigure the
environment for GitHub Copilot agents. This workflow ensures that
Copilot agents have the necessary dependencies and tools installed
before they begin their operations.
## Changes
- Created `.github/workflows/copilot-setup-steps.yml` with a job named
`copilot-setup-steps` (required by GitHub Copilot)
- Integrated setup steps from the existing `build-and-test.yml` workflow
to ensure consistency:
- Checkout code using `actions/checkout@v5`
- Setup .NET SDK with versions 3.1.x and 8.x using
`actions/setup-dotnet@v5`
- Restore project dependencies with `dotnet restore`
## Workflow Configuration
- **Runs on**: `ubuntu-latest`
- **Permissions**: `contents: read` (minimal permissions required)
- **Triggers**:
- Manual dispatch via the Actions tab
- Automatic execution on push/PR when the workflow file itself is
modified (for easy validation)
## Benefits
- GitHub Copilot agents will have a properly configured .NET environment
with all dependencies restored
- Reduces setup time and potential errors during agent operations
- Maintains consistency with the existing CI/CD pipeline setup steps
- Allows for easy testing and validation of the setup process
This workflow follows GitHub's recommended pattern for Copilot agent
setup and uses the same action versions as the existing
`build-and-test.yml` workflow for consistency.
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> Create a GitHub Actions workflow file at
.github/workflows/copilot-setup-steps.yml to preconfigure the
environment for GitHub Copilot agents. The workflow should include a
single job named 'copilot-setup-steps'. Integrate setup and reusable
actions from the existing build and test CI workflows to ensure
consistency and proper environment configuration.
>
> ex:
>
> ```
> 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
> etc...
> ```
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/IntelliTect/Multitool/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: BenjaminMichaelis <[email protected]>
Co-authored-by: Benjamin Michaelis <[email protected]>1 parent b4ae641 commit a07b4b9
File tree
2 files changed
+38
-3
lines changed- .github/workflows
2 files changed
+38
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments