fix jest config

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-02-01 14:18:45 +01:00
parent 98e69d9e72
commit e47d166c4f
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -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;
};