Installation¶
GitHub Marketplace¶
The easiest way to use this action is through the GitHub Actions marketplace:
- Visit the AI Workflow Failure Summary Action on GitHub Marketplace
- Click "Use latest version"
- Copy the usage snippet to your workflow
Manual Installation¶
Using a Specific Version (Recommended)¶
- uses: ianlintner/ai_summary_action@v1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# ... other inputs
Using Latest Version¶
- uses: ianlintner/ai_summary_action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# ... other inputs
Using Main Branch (Not Recommended for Production)¶
- uses: ianlintner/ai_summary_action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# ... other inputs
Production Usage
Always pin to a specific version tag (like @v1.0.0) in production workflows to avoid unexpected breaking changes.
Prerequisites¶
1. GitHub Token¶
The action requires a GitHub token to access workflow logs and create issues. The default GITHUB_TOKEN is usually sufficient:
Required Permissions:
permissions:
actions: read # To fetch workflow logs
contents: read # To access repository
issues: write # If creating issues (optional)
2. LLM Provider API Key¶
Choose one of the supported providers and obtain an API key:
Get API Key:
1. Visit OpenAI API Keys
2. Sign in or create an account
3. Create a new API key
4. Add to repository secrets as OPENAI_API_KEY
Pricing: Pay-as-you-go, starting at $0.03 per 1K tokens for GPT-4o-mini
Best For: General use, best balance of cost and quality
Get API Key:
1. No additional key needed! Use ${{ secrets.GITHUB_TOKEN }}
2. Visit GitHub Models Marketplace
3. Check available models and rate limits
Pricing: Free tier available with rate limits
Best For: Getting started, testing, small projects
Get API Key:
1. Visit Anthropic Console
2. Sign up for an account
3. Create an API key
4. Add to repository secrets as ANTHROPIC_API_KEY
Pricing: Pay-as-you-go, competitive with OpenAI
Best For: Advanced reasoning, large context windows
Get API Key:
1. Create an Azure OpenAI resource
2. Deploy a model (e.g., gpt-4o)
3. Get the endpoint and API key
4. Add to secrets:
- AZURE_OPENAI_API_KEY
- AZURE_OPENAI_ENDPOINT
- AZURE_OPENAI_DEPLOYMENT
Pricing: Enterprise pricing through Azure
Best For: Enterprise deployments, compliance requirements
Adding Secrets to Your Repository¶
Repository Secrets (Recommended)¶
- Go to your repository on GitHub
- Click Settings → Secrets and variables → Actions
- Click New repository secret
- Add each required secret:
- Name:
OPENAI_API_KEY(or your provider) - Value: Your API key
- Name:
- Click Add secret
Organization Secrets¶
For multiple repositories:
- Go to your organization on GitHub
- Click Settings → Secrets and variables → Actions
- Click New organization secret
- Add the secret and select which repositories can access it
Environment Secrets¶
For environment-specific configuration:
- Create an environment in your repository settings
- Add secrets to that environment
- Reference in your workflow:
jobs:
analyze:
runs-on: ubuntu-latest
environment: production # Use environment secrets
steps:
- uses: ianlintner/ai_summary_action@v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Verification¶
To verify installation, add a simple test workflow:
name: Test AI Action
on:
workflow_dispatch: # Manual trigger
jobs:
fail-intentionally:
runs-on: ubuntu-latest
steps:
- name: This will fail
run: exit 1
analyze:
runs-on: ubuntu-latest
if: failure()
needs: [fail-intentionally]
steps:
- name: Analyze Failure
uses: ianlintner/ai_summary_action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
llm-provider: 'openai'
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Run this workflow manually from the Actions tab to test your setup.
System Requirements¶
- GitHub Actions: Any runner (ubuntu-latest, windows-latest, macos-latest)
- Node.js Runtime: Node 20 (provided by GitHub Actions)
- Internet Access: Required to call LLM provider APIs
- Permissions: Read access to Actions, optional write access to Issues
Upgrading¶
To upgrade to a newer version:
- Check the Changelog for breaking changes
- Update the version in your workflow:
- Test in a non-production workflow first
- Roll out to all workflows
Uninstalling¶
To remove the action:
- Delete or comment out the action step in your workflows
- Optionally remove the API key secret from repository settings
- Remove any custom prompt files from
.github/prompts/
Next Steps¶
- Configuration Guide - Learn about all available options
- Quick Start - Get up and running quickly