Skip to content

Commit f62c5ee

Browse files
authored
fix: working-directory input for all stages (#1272)
1 parent fdbfa4b commit f62c5ee

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

dist/index.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/buildExec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const buildCommitExec = () => {
2626
const slug = core.getInput('slug');
2727
const token = core.getInput('token');
2828
const failCi = isTrue(core.getInput('fail_ci_if_error'));
29+
const workingDir = core.getInput('working-directory');
2930

3031
const commitCommand = 'create-commit';
3132
const commitExecArgs = [];
@@ -72,6 +73,9 @@ const buildCommitExec = () => {
7273
if (failCi) {
7374
commitExecArgs.push('-Z');
7475
}
76+
if (workingDir) {
77+
commitOptions.cwd = workingDir;
78+
}
7579

7680

7781
return {commitExecArgs, commitOptions, commitCommand};
@@ -101,6 +105,7 @@ const buildReportExec = () => {
101105
const slug = core.getInput('slug');
102106
const token = core.getInput('token');
103107
const failCi = isTrue(core.getInput('fail_ci_if_error'));
108+
const workingDir = core.getInput('working-directory');
104109

105110

106111
const reportCommand = 'create-report';
@@ -141,6 +146,9 @@ const buildReportExec = () => {
141146
if (failCi) {
142147
reportExecArgs.push('-Z');
143148
}
149+
if (workingDir) {
150+
reportOptions.cwd = workingDir;
151+
}
144152

145153
return {reportExecArgs, reportOptions, reportCommand};
146154
};

0 commit comments

Comments
 (0)