Run Streetrace agents in your CI/CD pipeline to automate code reviews, testing, and analysis.
- 🚀 Download and execute Streetrace agents
- 💬 Automatic PR comments with agent output
- 🔧 Easy integration with existing workflows
- 🔒 Secure API key handling
name: Streetrace CI
on: [push, pull_request]
jobs:
streetrace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Streetrace Agent
uses: streetrace-ai/github-action@v1
with:
claims: |
agent_name: "myagent@v2"
recipe: "code_review@v1"
env:
STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}
STREETRACE_API_URL: ${{ secrets.STREETRACE_API_URL }}| Input | Description | Required | Default |
|---|---|---|---|
claims |
YAML key-value pairs for configuring the agent | Yes | - |
prompt |
Optional prompt to pass to the Streetrace agent | No | - |
All environment variables specified in the workflow's env field are passed to the Streetrace binary. This includes both required Streetrace configuration and any custom variables your agent needs.
Required Variables:
| Variable | Description | Required | Default |
|---|---|---|---|
STREETRACE_API_KEY |
Streetrace API Key for authentication | Yes | - |
STREETRACE_API_URL |
URL of the Streetrace API | No | https://api.streetrace.ai/ |
Custom Variables:
You can pass any additional environment variables (like repository secrets) to your Streetrace agent by including them in the env field alongside the required variables.
Currently supported claims:
| Claim | Description | Required |
|---|---|---|
agent_name |
Name and version of the agent (e.g., myagent@v2) |
Yes |
| Output | Description |
|---|---|
result |
The output from the Streetrace agent execution |
When running on pull requests, the action automatically posts the agent output as a comment. To enable this feature, ensure your workflow has write permissions:
permissions:
contents: read
pull-requests: write- uses: streetrace-ai/github-action@v1
with:
claims: |
agent_name: "codereview@v1"
env:
STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}
STREETRACE_API_URL: 'https://custom.streetrace.example.com/'- uses: streetrace-ai/github-action@v1
id: streetrace
with:
claims: |
agent_name: "analyzer@v2"
env:
STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}
- name: Process Results
run: |
echo "Agent output:"
echo "${{ steps.streetrace.outputs.result }}"- uses: streetrace-ai/github-action@v1
with:
claims: |
agent_name: "security_scanner@v3"
recipe: "vulnerability_scan@v1"
severity_threshold: "high"
env:
STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}Pass repository secrets or other environment variables to the Streetrace agent using the standard env field:
- uses: streetrace-ai/github-action@v1
with:
claims: |
agent_name: "deployment@v1"
env:
# Required Streetrace variables
STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}
# Custom variables for your agent
DATABASE_URL: ${{ secrets.DATABASE_URL }}
API_TOKEN: ${{ secrets.API_TOKEN }}
ENVIRONMENT: productionOverride the default prompt:
- uses: streetrace-ai/github-action@v1
with:
claims: |
agent_name: "analyzer@v2"
prompt: 'Focus on security vulnerabilities in the authentication module'
env:
STREETRACE_API_KEY: ${{ secrets.STREETRACE_API_KEY }}- Get your Streetrace API key from streetrace.ai
- Add it as a secret in your GitHub repository (Settings → Secrets → Actions)
- Create your agent in the Streetrace platform
- Add this action to your workflow
- Node.js 20.x runtime (handled automatically by GitHub Actions)
- Python 3.x (for pipx and streetrace CLI installation)
- Go to the Actions tab in your repository
- Select "Test Streetrace Action" or "Test Basic Functionality"
- Click "Run workflow"
- Optionally customize the agent name and API URL
- Monitor the workflow execution
Run the local test script:
./test-local.sh
# With custom parameters:
AGENT_NAME=myagent@v2 STREETRACE_API_URL=https://custom.api.url ./test-local.sh# Run unit tests
pnpm test
# Run tests in watch mode
pnpm test:watchSee CLAUDE.md for development guidelines.
# Install dependencies
pnpm install
# Make changes in src/
# ...
# Build the action (required before committing)
pnpm build
# Test locally
./test-local.sh
# Commit both src/ and dist/
git add src/ dist/
git commit -m "feat: your changes"MIT