Physical AI News (Japan)

Physical AI, robotics and compute — reported from Japan.

日本語
· Product launches· 日本語で読む

GitHub explains how to automate Copilot CLI with GitHub Actions

GitHub’s official documentation explains how to run Copilot CLI in GitHub Actions workflows. The CLI can be installed, authenticated and called noninteractively, with workflows triggered manually, on a schedule or by repository events. For many automation use cases, GitHub recommends Agentic Workflows, which include guardrails, rather than calling the CLI directly.

Key facts

  • For many automation use cases, GitHub recommends Agentic Workflows over calling Copilot CLI directly from a workflow step.
  • Copilot CLI can run on a GitHub Actions runner and accept a prompt noninteractively with `copilot -p PROMPT`.
  • The documented workflow triggers include repository events, manual runs and scheduled runs.
  • The documentation describes GITHUB_TOKEN and a personal access token (PAT) as authentication methods.
  • The example configures `contents: read`, `--allow-tool='shell(git:*)'`, `--allow-tool=write` and `--no-ask-user`.

What happened

GitHub’s official documentation describes how to install Copilot CLI on a GitHub Actions runner and run it automatically as part of a CI/CD process. Workflows can be triggered by repository events, manually or on a schedule, and pass prompts to the CLI in programmatic mode. For many automation use cases, GitHub recommends Agentic Workflows over calling the CLI directly from a workflow step.

Why it matters

GitHub’s examples show how to add Copilot CLI output to an Actions run summary so results from unattended runs can be reviewed within the workflow. Repository read access, Git operations and file writing are handled as separate settings, so permissions must be configured to match the scope of each automation task.

Analysis

The documentation is about more than connecting Copilot CLI to Actions. GitHub shows how to call the CLI directly from a workflow but recommends Agentic Workflows for many automation use cases, citing default GITHUB_TOKEN authentication and additional guardrails. In other words, the guidance presents both how to run the CLI and the operational choice of which execution path to use. The direct-execution example separates the process into inputs and outputs. A repository event, manual action or schedule starts the workflow; the runner checks out the code, installs the CLI and, after authentication, processes a prompt. The output goes to standard output and, in the example, is also written to a file and added to `GITHUB_STEP_SUMMARY`. The workflow therefore includes not only the AI response but also a step for making it available for human review as part of the Actions run. Permissions are also part of the configuration. The example’s `contents: read` permission is for reading repository information, while Git commands and writing are authorized separately with `--allow-tool`. For a PAT, the guide says to configure the `Copilot Requests` permission and pass the token through a secret. So if the example is extended to tasks such as creating changes, the same permissions as in the read-only example may not be enough; permissions appropriate to the task are a key consideration. The documentation lists creating pull requests and updating changelogs as possible applications, but does not guarantee that these tasks will be performed. While our report, GitHub publishes Copilot CLI cost-efficiency improvements, focuses on CLI cost efficiency, this documentation covers invocation, authentication, tool permissions and output handling in Actions. The two address different aspects of using the CLI: costs and implementation and operations. And while GitHub explains how to use and control Copilot CLI’s Autopilot mode covers continuous execution and permission management by users, this page gives an example of using `--no-ask-user` on an Actions runner, where user input cannot be assumed. Interactive use and unattended execution have different ways of handling confirmation. What remains unclear is actual usage and costs, the quality of generated results, and review and approval practices for tasks that make changes. The documentation provides configuration examples but no performance data or evaluations. When adopting the approach, teams need to consider the permissions required for each task, how people will review generated output, and when to use Agentic Workflows versus direct invocation.

Details

In the direct-execution example, Copilot CLI is installed on a GitHub Actions runner, credentials are set as environment variables, and the command `copilot -p PROMPT` is run. The example installs the CLI with `npm install -g @github/copilot` and uses `actions/checkout@v6` and `actions/setup-node@v7`. A workflow that generates a summary of repository changes is shown with both a manual `workflow_dispatch` trigger and a cron-based scheduled trigger. The documentation describes GITHUB_TOKEN, recommended for organization-owned repositories, and a personal access token (PAT) as an alternative. The example sets the `contents: read` permission and passes a secret through `COPILOT_GITHUB_TOKEN`. It also shows `--allow-tool='shell(git:*)'`, `--allow-tool=write` and `--no-ask-user` to control Git operations, file writing and follow-up questions to the user separately.

Sources

Translated from the Japanese original: /news/github-actions-de-copilot-cli-wo-jikkou-suru-jidouka-tejun-w-14325b. The Japanese version is authoritative if they differ.