11name : AgentReady Assessment
22
33on :
4- pull_request_target :
5- types : [opened, synchronize, reopened, labeled ]
4+ pull_request :
5+ types : [opened, synchronize, reopened]
66 push :
77 branches : [main, master]
88 workflow_dispatch :
99
1010jobs :
1111 assess :
12- if :
13- ((github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'lgtm' || github.event.label.name == 'ok-to-test')) ||
14- (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') || contains(github.event.pull_request.labels.*.name, 'lgtm')))) &&
15- github.event.pull_request.base.repo.full_name == 'feast-dev/feast'
1612 runs-on : ubuntu-latest
1713 permissions :
1814 contents : read
2218 - name : Checkout code
2319 uses : actions/checkout@v4
2420 with :
25- ref : ${{ github.event.pull_request.head.sha || github. sha }}
21+ ref : ${{ github.sha }}
2622
2723 - name : Set up Python
2824 uses : actions/setup-python@v5
3430 pip install agentready
3531
3632 - name : Run AgentReady Assessment
33+ continue-on-error : true
3734 run : |
3835 agentready assess . --verbose
3936
@@ -42,27 +39,40 @@ jobs:
4239 if : always()
4340 with :
4441 name : agentready-reports
45- path : .agentready/
42+ path : ${{ github.workspace }}/ .agentready/
4643 retention-days : 30
4744
4845 - name : Comment on PR
49- if : always() && github.event_name == 'pull_request_target'
46+ if : always() && github.event_name == 'pull_request'
47+ continue-on-error : true
5048 uses : actions/github-script@v7
5149 with :
5250 script : |
5351 const fs = require('fs');
54- const reportPath = '.agentready/report-latest.md';
52+ const path = require('path');
53+ const agentreadyDir = path.join(process.env.GITHUB_WORKSPACE, '.agentready');
5554
56- if (!fs.existsSync(reportPath )) {
57- console.log('No report found');
55+ if (!fs.existsSync(agentreadyDir )) {
56+ console.log('No .agentready directory found');
5857 return;
5958 }
6059
61- const report = fs.readFileSync(reportPath, 'utf8');
60+ const mdFiles = fs.readdirSync(agentreadyDir)
61+ .filter(f => f.startsWith('report-') && f.endsWith('.md'))
62+ .sort()
63+ .reverse();
64+
65+ if (mdFiles.length === 0) {
66+ console.log('No markdown report found');
67+ return;
68+ }
69+
70+ const report = fs.readFileSync(path.join(agentreadyDir, mdFiles[0]), 'utf8');
6271
6372 await github.rest.issues.createComment({
6473 issue_number: context.issue.number,
6574 owner: context.repo.owner,
6675 repo: context.repo.repo,
6776 body: report
6877 });
78+
0 commit comments