fix: working-directory input for all stages (#1272)

This commit is contained in:
Bo Anderson
2024-02-06 17:53:39 +00:00
committed by GitHub
parent fdbfa4b889
commit f62c5eebfe
3 changed files with 17 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ const buildCommitExec = () => {
const slug = core.getInput('slug');
const token = core.getInput('token');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const workingDir = core.getInput('working-directory');
const commitCommand = 'create-commit';
const commitExecArgs = [];
@@ -72,6 +73,9 @@ const buildCommitExec = () => {
if (failCi) {
commitExecArgs.push('-Z');
}
if (workingDir) {
commitOptions.cwd = workingDir;
}
return {commitExecArgs, commitOptions, commitCommand};
@@ -101,6 +105,7 @@ const buildReportExec = () => {
const slug = core.getInput('slug');
const token = core.getInput('token');
const failCi = isTrue(core.getInput('fail_ci_if_error'));
const workingDir = core.getInput('working-directory');
const reportCommand = 'create-report';
@@ -141,6 +146,9 @@ const buildReportExec = () => {
if (failCi) {
reportExecArgs.push('-Z');
}
if (workingDir) {
reportOptions.cwd = workingDir;
}
return {reportExecArgs, reportOptions, reportCommand};
};