> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Actions - GitHub Copilot SDK für Laravel

> Beschreibt die Installation der Copilot CLI und die Token-Authentifizierung, um das Laravel Copilot SDK mit GitHub Actions zu nutzen.

## Verwendung mit GitHub Actions

Ein Beispiel, wie Sie in GitHub Actions einen Artisan-Command ausführen und darin die Copilot CLI verwenden.

In GitHub Actions ist die Nutzung im stdio-Modus üblich.

## Wenn Sie den Befehl `copilot` direkt installieren

```yaml theme={null}
      - name: Install Copilot CLI
        run: |
          curl -fsSL https://gh.io/copilot-install | bash
          copilot version

      - name: Run command
        run: php artisan copilot:ping
        env:
          COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
```

* Installiert wird über `copilot-install`. Der Pfad bleibt `copilot`; es ist keine weitere Konfiguration erforderlich.
* Die Authentifizierung erfolgt über `COPILOT_GITHUB_TOKEN`. Jede von der Copilot CLI unterstützte Authentifizierungsmethode wie `GH_TOKEN` oder `GITHUB_TOKEN` ist ebenfalls möglich.
* Da das Token die Berechtigung `Copilot Requests` benötigt, dürfte der standardmäßige `GITHUB_TOKEN` nicht funktionieren.

## Wenn Sie den Befehl `gh` verwenden

Mit GitHub CLI 2.86.0 wurde eine Copilot-Installationsfunktion hinzugefügt. In üblichen GitHub-Actions-Umgebungen ist `gh` vorinstalliert, sodass keine zusätzliche Installation nötig ist. Vermutlich wird beim ersten Aufruf eines `gh copilot ...`-Befehls Copilot automatisch installiert; führen Sie daher nur `gh copilot version` aus.

> gh version 2.86.0 (2026-01-21)
> [https://github.com/cli/cli/releases/tag/v2.86.0](https://github.com/cli/cli/releases/tag/v2.86.0)
> ✓ Copilot CLI installed successfully

```yaml theme={null}
      - name: Install Copilot CLI
        run: |
          gh --version
          gh copilot version

      - name: Run command
        run: php artisan copilot:ping
        env:
          COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
          COPILOT_CLI_PATH: "gh copilot"
```

`COPILOT_CLI_PATH` wird nur für `gh copilot` gesondert behandelt; andere Einstellungen als `gh copilot` funktionieren nicht.

<Info>
  Aktuelle Informationen finden Sie im [GitHub-Repository](https://github.com/invokable/laravel-copilot-sdk).
</Info>


## Related topics

- [GitHub Copilot SDK für Laravel](/de/packages/laravel-copilot-sdk/index.md)
- [Authentifizierung - GitHub Copilot SDK für Laravel](/de/packages/laravel-copilot-sdk/auth.md)
- [Testing - GitHub Copilot SDK für Laravel](/de/packages/laravel-copilot-sdk/fake.md)
- [Laravel Cloud - GitHub Copilot SDK für Laravel](/de/packages/laravel-copilot-sdk/laravel-cloud.md)
- [Erste Schritte - GitHub Copilot SDK für Laravel](/de/packages/laravel-copilot-sdk/getting-started.md)
