Skip to content

Commit

Permalink
chore(action): add ci
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Cui <[email protected]>
  • Loading branch information
BlackHole1 committed Feb 22, 2024
1 parent a443562 commit a00545f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
const result = [];
let match;
while ((match = TASK_REGEXP.exec(text) !== null) {
result.push(match[1])
result.push(match[1]);
}
return {
Expand All @@ -49,7 +49,7 @@ jobs:
}
if (context.payload.action !== "edited") {
console.log("not edited event")
console.log("not edited event");
const { matrix, need_to_run } = getTask(process.env.RAW_BODY);
core.setOutput("matrix", matrix);
core.setOutput("need_to_run", need_to_run);
Expand Down Expand Up @@ -90,22 +90,22 @@ jobs:
const sortLatest = latestTasks.matrix.sort();
const sortPrevious = previousTasks.matrix.sort();
for (const [index, task] of sortPrevious.entries())) {
for (const [index, task] of sortPrevious.entries()) {
if (sortLatest[index] === undefined) {
console.log("latest task is less than previous, skip")
console.log("latest task is less than previous, skip");
continue;
}
if (task !== sortLatest[index]) {
console.log(`has added ${task}, need to run`)
console.log(`has added ${task}, need to run`);
const { matrix, need_to_run } = latestTasks;
core.setOutput("matrix", matrix);
core.setOutput("need_to_run", need_to_run);
return;
}
}
console.log("no new task added, skip")
console.log("no new task added, skip");
core.setOutput("matrix", []);
core.setOutput("need_to_run", false);
Expand Down

0 comments on commit a00545f

Please sign in to comment.