Skip to content

🚨 ArgoCD Deployment Failed: 2-broken-apps #8

🚨 ArgoCD Deployment Failed: 2-broken-apps

🚨 ArgoCD Deployment Failed: 2-broken-apps #8

name: Trigger Cluster Doctor
# Modified from @sitoader's workflow at: https://github.com/sitoader/AgenticWorkflows/blob/main/.github/workflows/generate-docs.yml
on:
workflow_dispatch:
issues:
types: [labeled]
jobs:
run-cluster-doctor:
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'cluster-doctor'
runs-on: ubuntu-latest
permissions:
contents: write # Required to read repository content and commit diffs
issues: write # Required to create GitHub issues for documentation recommendations
pull-requests: write # Required to create PRs if needed
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitHub Copilot CLI
run: |
curl -fsSL https://gh.io/copilot-install | bash
echo "Installed Copilot CLI version:"
copilot --version
- name: Analyze and delegate to Copilot
env:
GITHUB_MCP_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Workflow token for MCP GitHub operations (issues)
GITHUB_TOKEN: ${{ secrets.COPILOT_CLI_TOKEN }} # Personal PAT for Copilot API authentication
run: |
echo "Analyzing issue #${{ github.event.issue.number }}"
echo "Loading documentation criteria from prompt..."
export PROMPT="Use the GitHub MCP Server to help analyze GitHub Issue #${{ github.event.issue.number }} in the repository ${{ github.repository }}. Any changes or fixes should be documented back in the GitHub Issue as a comment in the thread, and use GitHub MCP server to create a PR should any material changes to the repo be made as part of the fix and noted as part of the issue comment response, also via GitHub MCP server."
echo "Delegating to GitHub Copilot..."
echo "- Copilot will use MCP to examine the issue"
echo "- Copilot will decide if changes are needed"
echo "- Copilot will create an issue comment, PR and link them as needed."
echo ""
copilot -p "$PROMPT" \
--agent "cluster-doctor" \
--additional-mcp-config @'.copilot/mcp-config.json' \
--allow-all-tools