add runtime-basedir input

Signed-off-by: CrazyMax <[email protected]>
This commit is contained in:
ArunKumarT1995 authored and CrazyMax committed 2025-08-06 21:36:25 +02:00
1 parent 29412e2cf6
commit de8d0f39ec
4 files changed
+10 -4

No files matched your search

+2 -1
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.`);