-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
91 lines (86 loc) · 2.72 KB
/
Copy pathaction.yaml
File metadata and controls
91 lines (86 loc) · 2.72 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
name: Renovate PR Evaluation
description: Evaluate Renovate PRs with AI-powered analysis and audit loop
inputs:
pr_number:
description: PR number to evaluate
required: true
mode:
description: "'dry-run' or 'post'"
required: false
default: dry-run
context:
description: "'local' or 'ci'"
required: false
default: ci
evaluator_model:
description: Model for evaluator
required: false
default: opus
auditor_model:
description: Model for auditor
required: false
default: sonnet
ci_timeout:
description: CI wait timeout in seconds
required: false
default: '300'
instructions:
description: Additional instructions for the evaluator
required: false
default: ''
anthropic_api_key:
description: Anthropic API key (use this OR claude_code_oauth_token)
required: false
default: ''
claude_code_oauth_token:
description: Claude Code OAuth token (use this OR anthropic_api_key)
required: false
default: ''
github_token:
description: GitHub token for gh CLI
required: true
runs:
using: composite
steps:
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: '24'
- name: Install Claude CLI
shell: bash
run: npm install -g @anthropic-ai/claude-code
- name: Run evaluation
id: evaluate
shell: bash
env:
GH_TOKEN: ${{ inputs.github_token }}
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }}
CLAUDE_CODE_OAUTH_TOKEN: ${{ inputs.claude_code_oauth_token }}
EVAL_INSTRUCTIONS: ${{ inputs.instructions }}
run: |
ARGS=(
--pr "${{ inputs.pr_number }}"
--"${{ inputs.mode }}"
--context "${{ inputs.context }}"
--evaluator-model "${{ inputs.evaluator_model }}"
--auditor-model "${{ inputs.auditor_model }}"
--ci-timeout "${{ inputs.ci_timeout }}"
--keep-artifacts
)
if [[ -n "$EVAL_INSTRUCTIONS" ]]; then
ARGS+=(--instructions "$EVAL_INSTRUCTIONS")
fi
OUTPUT=$("${{ github.action_path }}/evaluate.sh" "${ARGS[@]}" 2>&1 | tee /dev/stderr)
ARTIFACT_PATH=$(echo "$OUTPUT" | grep "^Artifacts:" | tail -1 | sed 's/Artifacts: //')
echo "artifact_path=$ARTIFACT_PATH" >> "$GITHUB_OUTPUT"
if [[ -n "$ARTIFACT_PATH" && -f "$ARTIFACT_PATH/result.json" ]]; then
echo "result_json=$ARTIFACT_PATH/result.json" >> "$GITHUB_OUTPUT"
fi
- name: Upload artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
if: always()
with:
name: renovate-eval-${{ inputs.pr_number }}
path: ${{ steps.evaluate.outputs.artifact_path || '/tmp/renovate-eval-*' }}
if-no-files-found: warn