diff --git a/jest.config.ts b/jest.config.ts index 455328b..c251b91 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -14,10 +14,14 @@ * limitations under the License. */ +import fs from 'fs'; +import os from 'os'; +import path from 'path'; + process.env = Object.assign({}, process.env, { GITHUB_REPOSITORY: 'docker/actions-toolkit', - RUNNER_TEMP: '/tmp/github_runner', - RUNNER_TOOL_CACHE: '/tmp/github_tool_cache' + RUNNER_TEMP: fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-github-runner-')).split(path.sep).join(path.posix.sep), + RUNNER_TOOL_CACHE: fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-github-tool-cache-')).split(path.sep).join(path.posix.sep) }) as { [key: string]: string; };