2026-03-10 14:24:33 -04:00
# setup-copilot
A GitHub Action to install the [GitHub Copilot CLI ](https://github.com/github/copilot-cli ) in your workflow.
## Usage
```yaml
steps:
2026-03-10 20:55:09 -04:00
- uses: actions/setup-copilot@v0
2026-03-10 14:24:33 -04:00
with:
version: "latest" # optional, defaults to "latest"
2026-03-14 10:01:21 -04:00
github-token: ${{ secrets.GITHUB_TOKEN }} # optional, defaults to github.token
2026-03-10 14:24:33 -04:00
- run: copilot --version
```
## Inputs
| Input | Description | Required | Default |
| -------------- | ------------------------------------------------- | -------- | ---------------- |
| `version` | Version to install (`latest` , `prerelease` , or a specific version like `1.0.0` ) | No | `latest` |
2026-03-10 16:58:53 -04:00
| `github-token` | GitHub token for downloading Copilot CLI | No | `github.token` |
2026-03-10 14:24:33 -04:00
## Outputs
| Output | Description |
| --------- | -------------------------------------- |
| `version` | The version of Copilot CLI installed |
## Examples
### Install latest version
```yaml
2026-03-10 20:55:09 -04:00
- uses: actions/setup-copilot@v0
2026-03-10 14:24:33 -04:00
```
### Install a specific version
```yaml
2026-03-10 20:55:09 -04:00
- uses: actions/setup-copilot@v0
2026-03-10 14:24:33 -04:00
with:
version: "1.2.3"
```
### Use with a custom token
```yaml
2026-03-10 20:55:09 -04:00
- uses: actions/setup-copilot@v0
2026-03-10 14:24:33 -04:00
with:
2026-03-10 16:58:53 -04:00
github-token: ${{ secrets.GH_TOKEN }}
2026-03-10 14:24:33 -04:00
```
## How it works
This action uses the [official Copilot CLI install script ](https://gh.io/copilot-install ) to download and install the binary, with checksum verification. The binary is installed to the runner's tool cache and added to `PATH` .
## License
[MIT ](LICENSE )
2026-03-10 15:47:44 -04:00
## Contributions
Contributions are welcome! See [Contributor's Guide ](CONTRIBUTING.md )
## Code of Conduct
:wave: Be nice. See [our code of conduct ](CODE_OF_CONDUCT.md )