Skip to content

Commit

Permalink
Change directory of written files
Browse files Browse the repository at this point in the history
  • Loading branch information
willsawyerrrr committed Jan 22, 2024
1 parent 56ea60f commit 525cd16
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ async function run({ payload }: EmitterWebhookEvent<"pull_request">) {

let output: Buffer;
try {
output = execSync("multi-gitter run /tmp/script.sh --config /tmp/config.yaml");
output = execSync(
"multi-gitter run /multi-gitter-runner/script.sh --config /multi-gitter-runner/config.yaml"
);
} catch (error) {
const output = (error as SpawnSyncReturns<Buffer>).stdout.toString();

Expand Down Expand Up @@ -132,14 +134,16 @@ async function verify({ payload }: EmitterWebhookEvent<"pull_request">) {
ref: payload.pull_request.head.sha,
})) as components["schemas"]["content-file"];

writeFileSync(`/tmp/${name}`, content, {
writeFileSync(`/multi-gitter-runner/${name}`, content, {
mode: name === "script.sh" ? 0o755 : 0o644,
});
});

let output: Buffer;
try {
output = execSync("multi-gitter run /tmp/script.sh --config /tmp/config.yaml");
output = execSync(
"multi-gitter run /multi-gitter-runner/script.sh --config /multi-gitter-runner/config.yaml"
);
} catch (error) {
const output = (error as SpawnSyncReturns<Buffer>).stdout.toString();

Expand Down

0 comments on commit 525cd16

Please sign in to comment.