-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions workflow for Copilot environment setup with reusable .NET build action #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub Actions workflow for Copilot environment setup with reusable .NET build action #75
Conversation
Co-authored-by: BenjaminMichaelis <[email protected]>
|
@copilot i don't see node or in this project or the existing CI. Do we need this stuff? |
Co-authored-by: BenjaminMichaelis <[email protected]>
You're absolutely correct! This is a pure .NET project and doesn't need Node.js. I removed the unnecessary Node.js setup, npm ci, and JavaScript dependency files. The workflow now only includes .NET environment setup (consistent with your existing CI workflows) plus basic Copilot environment configuration. Fixed in commit bafe2f1. |
|
@copilot should we include building the project in the setup? And should the setup dotnet / restore / build be in a reusable action so it can be shared with the main CI workflow? |
Co-authored-by: BenjaminMichaelis <[email protected]>
Great suggestions! I've made both changes:
This eliminates duplication and makes the workflows more maintainable. Changes in commit aeefe54. |
This PR adds a new GitHub Actions workflow to preconfigure the environment before GitHub Copilot agents start working on the repository. The workflow follows best practices for Copilot integration and maintains consistency with existing CI/CD workflows.
Changes Made
New Workflow File
.github/workflows/copilot-setup-steps.yml- Main workflow that sets up .NET environment and builds the project for CopilotReusable Composite Action
.github/actions/setup-dotnet-build/action.yml- New reusable composite action that handles .NET setup, dependency restoration, and buildingbuild-and-test.yml- Now uses the reusable action to eliminate code duplicationWorkflow Features
The new
copilot-setup-stepsjob includes:dotnet restorecontents: readonly) following security best practicesworkflow_dispatchConsistency with Existing Workflows
The implementation maintains consistency with the repository's existing CI/CD patterns:
pwsh) and runner (ubuntu-latest)build-and-test.ymlactions/checkout@v5,actions/setup-dotnet@v4)This workflow ensures Copilot agents have access to a properly configured .NET development environment with compiled artifacts before beginning code analysis or generation tasks.
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.