diff --git a/action.yml b/action.yml index a360271..baecc03 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,8 @@ inputs: description: The git ref to build. This will usually be a sha, but can be a branch or anything supported by git checkout. token: description: Pass `github.token` if this is a private repository. + workdir: + description: Use this if your module is not in the repo root. If you pass this, the `meta-path` will be relative to this workdir, not to repo root. runs: using: node20 diff --git a/src/index.js b/src/index.js index d099833..a3d22fe 100644 --- a/src/index.js +++ b/src/index.js @@ -125,6 +125,9 @@ function parseBuildId(stdout) { if (getInput('token')) { startArgs.push('--token', getInput('token')); } + if (getInput('workdir')) { + startArgs.push('--workdir', getInput('workdir')); + } const spawnRet = spawnSync(cliPath, startArgs); checkSpawnSync(spawnRet); const buildId = parseBuildId(spawnRet.stdout);