Skip to content

Add GitHub Copilot CLI to hosted runner images#14045

Draft
salmanmkc wants to merge 1 commit into
actions:mainfrom
salmanmkc:salmanmkc/install-copilot-cli
Draft

Add GitHub Copilot CLI to hosted runner images#14045
salmanmkc wants to merge 1 commit into
actions:mainfrom
salmanmkc:salmanmkc/install-copilot-cli

Conversation

@salmanmkc
Copy link
Copy Markdown

Install @github/copilot via npm during image bake for Ubuntu 24.04 and 26.04. This pre-installs the Copilot CLI so agentic workflows using the Copilot engine do not need to install it at runtime, reducing workflow startup time.

Changes

  • images/ubuntu/scripts/build/install-copilot-cli.sh — install script using npm install -g @github/copilot --ignore-scripts
  • images/ubuntu/scripts/tests/CLI.Tools.Tests.ps1 — Pester test verifying copilot --version returns 0
  • images/ubuntu/templates/build.ubuntu-24_04.pkr.hcl — add to 24.04 image build
  • images/ubuntu/templates/build.ubuntu-26_04.pkr.hcl — add to 26.04 image build

Install @github/copilot via npm during image bake for Ubuntu 24.04
and 26.04. This pre-installs the Copilot CLI so agentic workflows
using the Copilot engine do not need to install it at runtime,
reducing workflow startup time.

- Add install-copilot-cli.sh install script
- Add Copilot CLI test to CLI.Tools.Tests.ps1
- Add to 24.04 and 26.04 Packer templates
Copilot AI review requested due to automatic review settings May 13, 2026 14:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the GitHub Copilot CLI to the Ubuntu 24.04 and 26.04 hosted runner image bake, so workflows can use copilot without installing it at runtime.

Changes:

  • Add a new Ubuntu build script to install @github/copilot globally via npm.
  • Add a Pester test to validate copilot --version succeeds (skipped on Ubuntu 22.04).
  • Wire the install script into the Ubuntu 24.04 and 26.04 Packer build templates.
Show a summary per file
File Description
images/ubuntu/templates/build.ubuntu-26_04.pkr.hcl Adds the Copilot CLI install step to the Ubuntu 26.04 image build script list.
images/ubuntu/templates/build.ubuntu-24_04.pkr.hcl Adds the Copilot CLI install step to the Ubuntu 24.04 image build script list.
images/ubuntu/scripts/tests/CLI.Tools.Tests.ps1 Adds a Pester validation that copilot --version returns exit code 0 (skipped on 22.04).
images/ubuntu/scripts/build/install-copilot-cli.sh New installer that installs the Copilot CLI via npm and invokes the corresponding tests.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 2

Comment on lines 111 to 116
"${path.root}/../scripts/build/install-cmake.sh",
"${path.root}/../scripts/build/install-codeql-bundle.sh",
"${path.root}/../scripts/build/install-awf.sh",
"${path.root}/../scripts/build/install-copilot-cli.sh",
"${path.root}/../scripts/build/install-container-tools.sh",
"${path.root}/../scripts/build/install-dotnetcore-sdk.sh",
Comment on lines 108 to 114
"${path.root}/../scripts/build/install-aws-tools.sh",
"${path.root}/../scripts/build/install-clang.sh",
"${path.root}/../scripts/build/install-cmake.sh",
"${path.root}/../scripts/build/install-codeql-bundle.sh",
"${path.root}/../scripts/build/install-awf.sh",
"${path.root}/../scripts/build/install-copilot-cli.sh",
"${path.root}/../scripts/build/install-container-tools.sh",
@salmanmkc salmanmkc marked this pull request as draft May 15, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants