-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
72 lines (68 loc) · 2.33 KB
/
action.yml
File metadata and controls
72 lines (68 loc) · 2.33 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
name: "Nominal Code Review"
description: "AI-powered code review for pull requests using Claude"
author: "gauthierdmn"
branding:
icon: "code"
color: "purple"
inputs:
anthropic_api_key:
description: "Anthropic API key (required when provider is 'anthropic')"
required: false
default: ""
openai_api_key:
description: "OpenAI-compatible API key (required when provider is 'openai', 'deepseek', 'groq', 'together', or 'fireworks')"
required: false
default: ""
github_token:
description: "GitHub token for posting review comments (defaults to github.token)"
required: true
provider:
description: "LLM provider to use (anthropic, openai, deepseek, groq, together, fireworks)"
required: false
default: "anthropic"
model:
description: "Model to use (e.g. claude-sonnet-4-20250514, gpt-4.1). Defaults to the provider's default model."
required: false
default: ""
max_turns:
description: "Maximum agentic turns for the reviewer (0 = unlimited)"
required: false
default: "0"
prompt:
description: "Custom review instructions appended to the default prompt"
required: false
default: ""
coding_guidelines:
description: "Path to a coding guidelines file (relative to repo root)"
required: false
default: ""
runs:
using: "composite"
steps:
- shell: bash
env:
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }}
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
GITHUB_TOKEN: ${{ inputs.github_token }}
AGENT_PROVIDER: ${{ inputs.provider }}
INPUT_MODEL: ${{ inputs.model }}
INPUT_MAX_TURNS: ${{ inputs.max_turns }}
INPUT_PROMPT: ${{ inputs.prompt }}
INPUT_CODING_GUIDELINES: ${{ inputs.coding_guidelines }}
run: |
IMAGE="ghcr.io/gauthierdmn/nominal-code:latest"
docker run --rm \
-e GITHUB_ACTIONS=true \
-e GITHUB_EVENT_PATH=/github/event.json \
-e GITHUB_WORKSPACE=/github/workspace \
-e ANTHROPIC_API_KEY \
-e OPENAI_API_KEY \
-e GITHUB_TOKEN \
-e AGENT_PROVIDER \
-e INPUT_MODEL \
-e INPUT_MAX_TURNS \
-e INPUT_PROMPT \
-e INPUT_CODING_GUIDELINES \
-v "${GITHUB_EVENT_PATH}:/github/event.json:ro" \
-v "${GITHUB_WORKSPACE}:/github/workspace" \
"$IMAGE"