Skip to content

Commit 915bc23

Browse files
committed
feat: Add agentready assessment workflow
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
1 parent 114b7db commit 915bc23

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: AgentReady Assessment
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches: [main, master]
8+
workflow_dispatch:
9+
10+
jobs:
11+
assess:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
28+
- name: Install AgentReady
29+
run: |
30+
pip install agentready
31+
32+
- name: Run AgentReady Assessment
33+
run: |
34+
agentready assess . --verbose
35+
36+
- name: Upload Assessment Reports
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: agentready-reports
41+
path: .agentready/
42+
retention-days: 30
43+
44+
- name: Comment on PR
45+
if: github.event_name == 'pull_request_target'
46+
uses: actions/github-script@v7
47+
with:
48+
script: |
49+
const fs = require('fs');
50+
const reportPath = '.agentready/report-latest.md';
51+
52+
if (!fs.existsSync(reportPath)) {
53+
console.log('No report found');
54+
return;
55+
}
56+
57+
const report = fs.readFileSync(reportPath, 'utf8');
58+
59+
await github.rest.issues.createComment({
60+
issue_number: context.issue.number,
61+
owner: context.repo.owner,
62+
repo: context.repo.repo,
63+
body: report
64+
});

0 commit comments

Comments
 (0)