mirror of
https://github.com/docker/setup-docker-action.git
synced 2026-03-20 16:49:46 +00:00
move runtime-basedir default to context
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import * as crypto from 'crypto';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import * as core from '@actions/core';
|
||||
import * as actionsToolkit from '@docker/actions-toolkit';
|
||||
@@ -18,8 +17,7 @@ actionsToolkit.run(
|
||||
// main
|
||||
async () => {
|
||||
const input: context.Inputs = context.getInputs();
|
||||
const runBasedir = input.runtimeBasedir || path.join(os.homedir(), `setup-docker-action`);
|
||||
const runDir = path.join(runBasedir, `run-${crypto.randomUUID().slice(0, 8)}`);
|
||||
const runDir = path.join(input.runtimeBasedir, `run-${crypto.randomUUID().slice(0, 8)}`);
|
||||
|
||||
if (input.context == 'default') {
|
||||
throw new Error(`'default' context cannot be used.`);
|
||||
|
||||
Reference in New Issue
Block a user