Skip to content

Commit

Permalink
fix: working-directory input for all stages (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 authored Feb 6, 2024
1 parent fdbfa4b commit f62c5ee
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32267,6 +32267,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 = [];
const commitOptions = {};
Expand Down Expand Up @@ -32306,6 +32307,9 @@ const buildCommitExec = () => {
if (failCi) {
commitExecArgs.push('-Z');
}
if (workingDir) {
commitOptions.cwd = workingDir;
}
return { commitExecArgs, commitOptions, commitCommand };
};
const buildGeneralExec = () => {
Expand All @@ -32330,6 +32334,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';
const reportExecArgs = [];
const reportOptions = {};
Expand Down Expand Up @@ -32363,6 +32368,9 @@ const buildReportExec = () => {
if (failCi) {
reportExecArgs.push('-Z');
}
if (workingDir) {
reportOptions.cwd = workingDir;
}
return { reportExecArgs, reportOptions, reportCommand };
};
const buildUploadExec = () => {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -72,6 +73,9 @@ const buildCommitExec = () => {
if (failCi) {
commitExecArgs.push('-Z');
}
if (workingDir) {
commitOptions.cwd = workingDir;
}


return {commitExecArgs, commitOptions, commitCommand};
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -141,6 +146,9 @@ const buildReportExec = () => {
if (failCi) {
reportExecArgs.push('-Z');
}
if (workingDir) {
reportOptions.cwd = workingDir;
}

return {reportExecArgs, reportOptions, reportCommand};
};
Expand Down

0 comments on commit f62c5ee

Please sign in to comment.