Skip to content

.github/workflows/copilot-ci-fix.yml #216

.github/workflows/copilot-ci-fix.yml

.github/workflows/copilot-ci-fix.yml #216

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) }}
```