Skip to content

Fix Copilot not working in forks#65492

Merged
wtgodbe merged 2 commits into
dotnet:mainfrom
martincostello:change-copilot-runner-in-forks
Feb 20, 2026
Merged

Fix Copilot not working in forks#65492
wtgodbe merged 2 commits into
dotnet:mainfrom
martincostello:change-copilot-runner-in-forks

Conversation

@martincostello
Copy link
Copy Markdown
Member

@martincostello martincostello commented Feb 20, 2026

Fix Copilot not working on forks

Use a public runner image to allow Copilot setup steps to run in forks of this repository.

Description

While looking into #65371 (comment) in my fork, I found that Agent workflows would hang indefinitely waiting for a GitHub Actions runner with the custom label to be available (because my account has no such custom runner).

Once I manually updated my main branch to use a public runner image label, things started to work.

This change should allow for .NET team members to continue to benefit from the beefier runner, while community members get something that works, even if it's slower.

If this change is taken, it should probably be applied to at least aspire, and maybe any other dotnet repos that might use the same label?

Use a public runner image to allow Copilot setup steps to run in forks of the repository.
Copilot AI review requested due to automatic review settings February 20, 2026 15:56
@martincostello martincostello requested review from a team and wtgodbe as code owners February 20, 2026 15:56
@github-actions github-actions Bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 20, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Feb 20, 2026
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 fixes a bug where Copilot setup workflows would hang indefinitely in forked repositories due to the use of a custom runner label (8-core-ubuntu-latest) that is only available in the main dotnet organization. The fix introduces conditional logic to select the appropriate runner based on whether the workflow is running in a fork or the main repository.

Changes:

  • Modified runner selection in copilot-setup-steps.yml to use conditional logic that selects 8-core-ubuntu-latest for the main repository and ubuntu-latest for forks

Comment thread .github/workflows/copilot-setup-steps.yml Outdated
Comment thread .github/workflows/copilot-setup-steps.yml Outdated
Change condition for detecting a fork to instead just check the repo owner.
Copy link
Copy Markdown
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

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

Thanks!

@wtgodbe wtgodbe merged commit 01bf0df into dotnet:main Feb 20, 2026
10 checks passed
@martincostello martincostello deleted the change-copilot-runner-in-forks branch February 20, 2026 19:26
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview2 milestone Feb 20, 2026
@wtgodbe wtgodbe modified the milestones: 11.0-preview2, 11.0-preview3 Feb 27, 2026
martincostello added a commit to martincostello/runtime that referenced this pull request Mar 3, 2026
Use a public runner image to allow Copilot setup steps to run in forks of the repository.

Port of dotnet/aspnetcore#65492.
akoeplinger pushed a commit to dotnet/runtime that referenced this pull request Mar 3, 2026
Use a public runner image to allow Copilot setup steps to run in forks
of the repository.

Port of dotnet/aspnetcore#65492.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants