-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Copilot agent environment setup workflow #152
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
Conversation
Co-authored-by: josecelano <[email protected]>
Co-authored-by: josecelano <[email protected]>
Co-authored-by: josecelano <[email protected]>
|
@copilot, the new workflow is failing to install We are installing it in the workflow with "./packages/dependency-installer/src/installer/cargo_machete.rs" The error: Copilot agent is executed as a workflow in a runner with this configuration: The virtual machine has these tools installed: https://github.com/actions/runner-images/blob/ubuntu24/20251030.96/images/ubuntu/Ubuntu2404-Readme.md
Ubuntu 24.04
Installed SoftwareLanguage and Runtime
Package Management
Environment variables
Homebrew noteProject Management
Tools
CLI Tools
Java
PHP Tools
Haskell Tools
Rust Tools
Packages
Browsers and Drivers
Environment variables
.NET Tools
Databases
PostgreSQL
MySQL
Cached ToolsGo
Node.js
Python
PyPy
Ruby
PowerShell Tools
PowerShell Modules
Web Servers
Android
Environment variables
Installed apt packages
|
The installer binary handles sudo internally for dependencies that require it (OpenTofu, Ansible, LXD). Running the entire binary with sudo causes cargo-machete installation to fail because cargo is not in sudo's PATH. cargo-machete is installed via 'cargo install' and doesn't need sudo. Co-authored-by: josecelano <[email protected]>
... Fixed in commit ca533d5. The issue was that the workflow was running the entire installer with The solution: removed
The workflow now runs |
josecelano
left a comment
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.
ACK ca533d5
Configure GitHub Copilot Agent Environment Setup
This PR implements a GitHub Actions workflow that preinstalls all required development dependencies before the Copilot coding agent starts working, ensuring consistent environment setup.
Implementation Complete ✅
.github/workflows/copilot-setup-steps.ymlworkflow fileWorkflow Features
File:
.github/workflows/copilot-setup-steps.ymlcopilot-setup-steps(required by GitHub)ubuntu-latest(only Ubuntu x64 supported by Copilot)contents: read)workflow_dispatch- manual testing from Actions tabpush- when workflow file is modifiedpull_request- validation before mergingSteps:
actions/checkout@v4dtolnay/rust-toolchain@stableSwatinem/rust-cache@v2Dependencies Installed:
Technical Implementation
target/release/dependency-installer)cargo build --release -p torrust-dependency-installer --bin dependency-installerDEBIAN_FRONTEND=noninteractivefor non-interactive installationtarget/release/dependency-installer checkconfirms all tools installedRecent Fix
Issue: cargo-machete installation failed with "No such file or directory (os error 2)"
Root Cause: Running the entire installer with
sudoprevented cargo-machete from being installed because thecargocommand was not in sudo's PATH.Solution: Removed
sudofrom the workflow invocation. The installer binary already handles sudo internally for dependencies that need it (OpenTofu, Ansible, LXD), while cargo-machete doesn't require sudo.Quality Checks ✅
Security Summary
No security vulnerabilities detected. The workflow follows security best practices:
contents: read)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.