forked from trustyai-explainability/guardrails-detectors
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (52 loc) · 1.52 KB
/
agentready-assessment.yml
File metadata and controls
63 lines (52 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
- 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: github.event_name == 'pull_request'
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');
// Post comment with assessment results
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: report
});