diff --git a/main/index.mjs b/main/index.mjs index 4763b10..2ba3f53 100644 --- a/main/index.mjs +++ b/main/index.mjs @@ -27241,8 +27241,10 @@ var __webpack_exports__ = {}; async function main() { - await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", [".", "-B", "build"]); - _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", "build"); + const sourceDir = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("source-dir"); + const buildDir = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("build-dir"); + await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]); + _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", buildDir || "build"); } main(); //# sourceMappingURL=main.mjs.map diff --git a/src/main.mts b/src/main.mts index ab7addc..c58244d 100644 --- a/src/main.mts +++ b/src/main.mts @@ -2,8 +2,10 @@ import core from "@actions/core"; import exec from "@actions/exec"; async function main() { - await exec.exec("cmake", [".", "-B", "build"]); - core.setOutput("build-dir", "build"); + const sourceDir = core.getInput("source-dir"); + const buildDir = core.getInput("build-dir"); + await exec.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]); + core.setOutput("build-dir", buildDir || "build"); } main();