.github/workflows/copilot-ci-fix.yml #209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| workflow_run: | |
| workflows: ['*'] # All workflow failures | |
| types: [completed] | |
| permissions: write-all # We need workflow: write | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| jobs: | |
| ci-failure: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'failure' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: austenstone/copilot-cli@main | |
| with: | |
| copilot-token: ${{ secrets.PAT }} | |
| repo-token: ${{ github.actor == 'dependabot[bot]' && secrets.PAT || github.token }} | |
| mcp-config: | | |
| { | |
| "mcpServers": { | |
| "github-mcp-server": { | |
| "type": "http", | |
| "url": "https://api.githubcopilot.com/mcp/", | |
| "headers": { | |
| "Authorization": "Bearer ${{ secrets.PAT }}", | |
| "X-MCP-Toolsets": "*" | |
| }, | |
| "tools": ["*"] | |
| } | |
| } | |
| } | |
| agent: cicd-repair | |
| prompt: | | |
| The GitHub Actions workflow run failed. | |
| Please analyze the failure and suggest a fix. | |
| Create a pull request with the necessary changes. | |
| Include the error logs and any relevant information. | |
| ## Input Data | |
| ```json | |
| ${{ toJson(github.event) }} | |
| ``` |