Files
setup-copilot/action.yml

44 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2026-03-10 14:24:33 -04:00
name: "Setup Copilot CLI"
description: "Install the GitHub Copilot CLI for use in GitHub Actions workflows"
branding:
icon: "terminal"
color: "blue"
inputs:
version:
description: "Version of Copilot CLI to install (e.g. '1.0.0', 'latest', 'prerelease')"
required: false
default: "latest"
github-token:
description: "GitHub token to download Copilot CLI. Defaults to the workflow token."
2026-03-10 14:24:33 -04:00
required: false
default: ${{ github.token }}
outputs:
version:
description: "The version of Copilot CLI that was installed"
value: ${{ steps.version.outputs.version }}
runs:
using: "composite"
steps:
- name: Install Copilot CLI
shell: bash
env:
VERSION: ${{ inputs.version }}
PREFIX: ${{ runner.tool_cache }}/copilot
run: curl -fsSL https://gh.io/copilot-install | bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
2026-03-10 14:24:33 -04:00
- name: Add to PATH
shell: bash
run: echo "${{ runner.tool_cache }}/copilot/bin" >> "$GITHUB_PATH"
- name: Verify installation
id: version
shell: bash
run: |
copilot --version
echo "version=$(copilot --version | head -1)" >> "$GITHUB_OUTPUT"