Skip to content

fix: replace actions/setup-copilot with npm install for Copilot CLI#1062

Merged
dgee2 merged 3 commits into
mainfrom
dgee2/fix-copilot-dependency-action
May 23, 2026
Merged

fix: replace actions/setup-copilot with npm install for Copilot CLI#1062
dgee2 merged 3 commits into
mainfrom
dgee2/fix-copilot-dependency-action

Conversation

@dgee2

@dgee2 dgee2 commented May 23, 2026

Copy link
Copy Markdown
Owner

Problem

The \Dependency updates (copilot)\ workflow has been failing on every run since it was created with:

\
##[error]Unable to resolve action \�ctions/setup-copilot, not found
\\

\�ctions/setup-copilot\ is not a real GitHub Action. This caused every matrix job to fail during the action-resolution phase before any step executed.

Fix

Replace:
\\yaml

  • name: Setup Copilot CLI
    uses: actions/setup-copilot@v0.0.5
    \\

with the correct installation method per the GitHub docs:
\\yaml

  • name: Install Copilot CLI
    run: npm install -g @github/copilot
    \\

The \�ctions/setup-node@v6\ step already present in the job ensures Node.js is available before this install runs.

Also replaces the hardcoded /tmp\ temp file path with \, which is the portable GitHub Actions convention.

Related

Closes #1010 (follow-up fix to PRs #1011 and #1026)

Copilot AI review requested due to automatic review settings May 23, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes the failing Copilot-driven dependency update workflow by replacing a non-existent GitHub Action (actions/setup-copilot) with the documented Copilot CLI installation approach, allowing the workflow to proceed past action resolution and execute its matrix jobs.

Changes:

  • Replace uses: actions/setup-copilot@v0.0.5 with npm install -g @github/copilot to install the Copilot CLI per GitHub documentation.
  • Replace hardcoded /tmp prompt file path with $RUNNER_TEMP for portability on GitHub-hosted runners.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/dependency-update.yml Fixed
Comment thread .github/workflows/dependency-update.yml Fixed
dgee2 and others added 2 commits May 23, 2026 22:21
actions/setup-copilot@v0.0.5 does not exist, causing the workflow to
fail immediately on every run since it was created.

Replace with the correct installation method per the GitHub docs:
  npm install -g @github/copilot

Also use \ instead of /tmp for the prompt temp file,
which is more portable and follows GitHub Actions best practices.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin npm global install to @github/copilot@1.0.51 to address SonarCloud
S8543 (unlocked dependency versions) and add --ignore-scripts flag to
address S6505 (shell script execution risk).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 21:21
@dgee2 dgee2 force-pushed the dgee2/fix-copilot-dependency-action branch from 5786eab to c86fb08 Compare May 23, 2026 21:21
@dgee2 dgee2 enabled auto-merge (squash) May 23, 2026 21:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/dependency-update.yml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented May 23, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Comment thread .github/workflows/dependency-update.yml Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/dependency-update.yml
@dgee2 dgee2 merged commit 8df6b79 into main May 23, 2026
14 checks passed
@dgee2 dgee2 deleted the dgee2/fix-copilot-dependency-action branch May 23, 2026 21:31
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.

Create a GitHub Actions workflow that uses Copilot to open dependency-update PRs by dependency group

3 participants