mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Update temp directory paths to use runner temp directory (#129)
* Update temp directory paths to use `runner` temp directory * Update temp directory paths to use `runner` temp directory
This commit is contained in:
@@ -107,7 +107,7 @@ runs:
|
||||
if: steps.prepare.outputs.contains_trigger == 'true'
|
||||
uses: anthropics/claude-code-base-action@1370ac97fbba9bddec20ea2924b5726bf10d8b94 # v0.0.9
|
||||
with:
|
||||
prompt_file: /tmp/claude-prompts/claude-prompt.txt
|
||||
prompt_file: ${{ runner.temp }}/claude-prompts/claude-prompt.txt
|
||||
allowed_tools: ${{ env.ALLOWED_TOOLS }}
|
||||
disallowed_tools: ${{ env.DISALLOWED_TOOLS }}
|
||||
timeout_minutes: ${{ inputs.timeout_minutes }}
|
||||
|
||||
@@ -620,7 +620,9 @@ export async function createPrompt(
|
||||
claudeBranch,
|
||||
);
|
||||
|
||||
await mkdir("/tmp/claude-prompts", { recursive: true });
|
||||
await mkdir(`${process.env.RUNNER_TEMP}/claude-prompts`, {
|
||||
recursive: true,
|
||||
});
|
||||
|
||||
// Generate the prompt
|
||||
const promptContent = generatePrompt(preparedContext, githubData);
|
||||
@@ -631,7 +633,10 @@ export async function createPrompt(
|
||||
console.log("=======================");
|
||||
|
||||
// Write the prompt file
|
||||
await writeFile("/tmp/claude-prompts/claude-prompt.txt", promptContent);
|
||||
await writeFile(
|
||||
`${process.env.RUNNER_TEMP}/claude-prompts/claude-prompt.txt`,
|
||||
promptContent,
|
||||
);
|
||||
|
||||
// Set allowed tools
|
||||
const allAllowedTools = buildAllowedToolsString(
|
||||
|
||||
Reference in New Issue
Block a user