-
Notifications
You must be signed in to change notification settings - Fork 644
Configure Copilot agent environment to match devcontainer #236
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the Copilot Coding Agent’s pre-run GitHub Actions setup workflow to provision the repo’s multi-language toolchain and install SDK dependencies up front, aligning the agent environment more closely with the devcontainer and existing CI workflows.
Changes:
- Adds PR trigger and expands
copilot-setup-stepsto install Node, Python+uv, Go, and .NET toolchains. - Installs additional tooling (
just,gh-aw) and pre-installs dependencies across SDKs and test harness. - Enables npm caching (and uv caching via
setup-uv) and adds a verification step for installed tools.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks for Update , Keep Ope Source . Just Attribute CC credits and All licenses . Next Project should Be Landing Pages For Micro Influencer: Easy Set Up - With Amazon AWS Support and Open Ai Backing - credits at 20$ Sent from my iPhoneOn Jan 27, 2026, at 2:59 PM, Copilot ***@***.***> wrote:
@Copilot commented on this pull request.
Pull request overview
Updates the Copilot Coding Agent’s pre-run GitHub Actions setup workflow to provision the repo’s multi-language toolchain and install SDK dependencies up front, aligning the agent environment more closely with the devcontainer and existing CI workflows.
Changes:
Adds PR trigger and expands copilot-setup-steps to install Node, Python+uv, Go, and .NET toolchains.
Installs additional tooling (just, gh-aw) and pre-installs dependencies across SDKs and test harness.
Enables npm caching (and uv caching via setup-uv) and adds a verification step for installed tools.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
In .github/workflows/copilot-setup-steps.yml:
+ - name: Set up Go
+ uses: ***@***.***
+ with:
+ go-version: "1.23"
+
+ # Setup .NET (for .NET SDK)
+ - name: Set up .NET
+ uses: ***@***.***
+ with:
+ dotnet-version: "8.0.x"
+
+ # Install just command runner
+ - name: Install just
+ uses: ***@***.***
+
+ # Install gh-aw extension for advanced GitHub CLI features
- name: Install gh-aw extension
run: |
curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash
Avoid piping a remote script from refs/heads/main into bash. This is a supply-chain risk and also bypasses the repo's own gh-aw installation guidance (see .github/aw/github-agentic-workflows.md which prefers gh extension install githubnext/gh-aw, with the standalone curl script only as a fallback). Use the gh extension install approach (or pin the installer to an immutable tag/commit) instead.
⬇️ Suggested change
- curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash
+ gh extension install githubnext/gh-aw
In .github/workflows/copilot-setup-steps.yml:
@@ -18,8 +22,87 @@ jobs:
contents: read
steps:
+ # Checkout the repository to install dependencies
+ - name: Checkout code
+ uses: ***@***.***
+
+ # Setup Node.js (for TypeScript/JavaScript SDK and tooling)
+ - name: Set up Node.js
+ uses: ***@***.***
+ with:
+ node-version: "22"
+ cache: "npm"
+ cache-dependency-path: "./nodejs/package-lock.json"
actions/setup-node caching is configured only for ./nodejs/package-lock.json, but this workflow also runs npm ci in ./test/harness. To actually benefit from npm caching for both installs, include the harness lockfile in cache-dependency-path (it supports multiple paths).
⬇️ Suggested change
- cache-dependency-path: "./nodejs/package-lock.json"
+ cache-dependency-path: |
+ ./nodejs/package-lock.json
+ ./test/harness/package-lock.json
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
The Copilot Coding Agent's ephemeral environment lacked the multi-language toolchain and dependencies required by this SDK repository, forcing the agent to discover and install them through trial and error during each session.
Changes
Updated
.github/workflows/copilot-setup-steps.ymlto pre-configure the agent environment:The configuration mirrors the devcontainer.json and aligns with existing CI/CD workflows.
Original prompt
Here's the documentation to customize the Copilot Coding Agent environment for a repo, you need to do this to match the devcontainer.json as much as possible:
In your
copilot-setup-steps.ymlfile, you can only customize the following settings of thecopilot-setup-stepsjob. If you try to customize other settings, your changes will be ignored.steps(see above)permissions(see above)runs-on(see below)servicessnapshottimeout-minutes(maximum value:59)For more information on these options, see Workflow syntax for GitHub Actions.
Any value that is set for the
fetch-depthoption of theactions/checkoutaction will be overridden to allow the agent to rollback commits upon request, while mitigating security risks. For more informati...💡 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.