add runtime-basedir input

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
ArunKumarT1995
2025-08-06 18:48:28 +05:30
committed by CrazyMax
parent 29412e2cf6
commit de8d0f39ec
4 changed files with 10 additions and 4 deletions

View File

@@ -18,7 +18,8 @@ actionsToolkit.run(
// main
async () => {
const input: context.Inputs = context.getInputs();
const runDir = path.join(os.homedir(), `setup-docker-action-${crypto.randomUUID().slice(0, 8)}`);
const runBasedir = input.runtimeBasedir || path.join(os.homedir(), `setup-docker-action`);
const runDir = path.join(runBasedir, `run-${crypto.randomUUID().slice(0, 8)}`);
if (input.context == 'default') {
throw new Error(`'default' context cannot be used.`);