CI: fix script context issues

This commit is contained in:
liushuyu 2022-10-11 22:35:27 -06:00
parent 3539eef81a
commit 54f56ebf50
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
3 changed files with 10 additions and 5 deletions

View File

@ -23,6 +23,6 @@ jobs:
script: | script: |
const execa = require("execa"); const execa = require("execa");
const mergebot = require('./.github/workflows/merge.js'); const mergebot = require('./.github/workflows/merge.js');
const branch = await mergebot.checkChanges(github); const branch = await mergebot.checkChanges(github, context);
if (branch) if (branch)
await mergeChanges(branch, execa); await mergeChanges(branch, execa);

View File

@ -56,7 +56,7 @@ async function mergeChanges(branch, execa) {
await incrementVersion(); await incrementVersion();
await execa("git", [ await execa("git", [
"add", "add",
"org.yuzu_emu.yuzu.json" "org.yuzu_emu.yuzu.json",
]); ]);
const process1 = await execa("git", ["commit", "--amend"]); const process1 = await execa("git", ["commit", "--amend"]);
process1.stdout.pipe(process.stdout); process1.stdout.pipe(process.stdout);
@ -66,9 +66,14 @@ async function mergeChanges(branch, execa) {
); );
} }
const process = await execa("git", ["push", "origin", `master:${branch}`, "-f"]); const process = await execa("git", [
"push",
"origin",
`master:${branch}`,
"-f",
]);
process.stdout.pipe(process.stdout); process.stdout.pipe(process.stdout);
await new Promise(r => setTimeout(r, 2000)); await new Promise((r) => setTimeout(r, 2000));
const process1 = await execa("git", ["push", "origin"]); const process1 = await execa("git", ["push", "origin"]);
process1.stdout.pipe(process1.stdout); process1.stdout.pipe(process1.stdout);
} }

@ -1 +1 @@
Subproject commit 1bb53934f105743f84f923693847185dce613cef Subproject commit a9112b9c62e2b84db4c2f6c55c9531fd7e8d03c1