Skip to content

feat: Add agentready assessment workflow #2

feat: Add agentready assessment workflow

feat: Add agentready assessment workflow #2

name: AgentReady Assessment
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main, master]
workflow_dispatch:
jobs:
assess:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install AgentReady
run: |
pip install agentready
- name: Run AgentReady Assessment
run: |
agentready assess . --verbose
- name: Upload Assessment Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: agentready-reports
path: .agentready/
retention-days: 30
- name: Comment on PR
if: always() && github.event_name == 'pull_request'
continue-on-error: true
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const reportPath = '.agentready/report-latest.md';
if (!fs.existsSync(reportPath)) {
console.log('No report found');
return;
}
const report = fs.readFileSync(reportPath, 'utf8');
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: report
});