mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de86beb3ae | ||
|
|
5c420d2402 |
@@ -188,7 +188,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
# Install Claude Code globally
|
||||
npm install -g @anthropic-ai/claude-code@1.0.53
|
||||
npm install -g @anthropic-ai/claude-code@1.0.56
|
||||
|
||||
# Run the base-action
|
||||
cd ${GITHUB_ACTION_PATH}/base-action
|
||||
|
||||
@@ -115,7 +115,7 @@ runs:
|
||||
|
||||
- name: Install Claude Code
|
||||
shell: bash
|
||||
run: npm install -g @anthropic-ai/claude-code@1.0.53
|
||||
run: npm install -g @anthropic-ai/claude-code@1.0.56
|
||||
|
||||
- name: Run Claude Code Action
|
||||
shell: bash
|
||||
|
||||
@@ -26,6 +26,7 @@ async function run() {
|
||||
appendSystemPrompt: process.env.INPUT_APPEND_SYSTEM_PROMPT,
|
||||
claudeEnv: process.env.INPUT_CLAUDE_ENV,
|
||||
fallbackModel: process.env.INPUT_FALLBACK_MODEL,
|
||||
model: process.env.ANTHROPIC_MODEL,
|
||||
});
|
||||
} catch (error) {
|
||||
core.setFailed(`Action failed with error: ${error}`);
|
||||
|
||||
@@ -21,6 +21,7 @@ export type ClaudeOptions = {
|
||||
claudeEnv?: string;
|
||||
fallbackModel?: string;
|
||||
timeoutMinutes?: string;
|
||||
model?: string;
|
||||
};
|
||||
|
||||
type PreparedConfig = {
|
||||
@@ -94,6 +95,9 @@ export function prepareRunConfig(
|
||||
if (options.fallbackModel) {
|
||||
claudeArgs.push("--fallback-model", options.fallbackModel);
|
||||
}
|
||||
if (options.model) {
|
||||
claudeArgs.push("--model", options.model);
|
||||
}
|
||||
if (options.timeoutMinutes) {
|
||||
const timeoutMinutesNum = parseInt(options.timeoutMinutes, 10);
|
||||
if (isNaN(timeoutMinutesNum) || timeoutMinutesNum <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user