From 1990b0bdb33a8d45e2ffa9786d357b123b66e040 Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Fri, 6 Jun 2025 01:53:56 +0900 Subject: [PATCH] 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 --- action.yml | 2 +- src/create-prompt/index.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 80651fe..82a97bf 100644 --- a/action.yml +++ b/action.yml @@ -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 }} diff --git a/src/create-prompt/index.ts b/src/create-prompt/index.ts index 5c20928..4a9f17b 100644 --- a/src/create-prompt/index.ts +++ b/src/create-prompt/index.ts @@ -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(