mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
fix: action run async (#79)
* fix: for await * style: perf mess Co-authored-by: meteorlxy <meteor.lxy@foxmail.com>
This commit is contained in:
12
src/main.js
12
src/main.js
@@ -90,15 +90,15 @@ async function main() {
|
|||||||
const actions = core.getInput('actions', { required: true });
|
const actions = core.getInput('actions', { required: true });
|
||||||
|
|
||||||
const actionsArr = actions.split(',');
|
const actionsArr = actions.split(',');
|
||||||
actionsArr.forEach(item => {
|
for (const action of actionsArr) {
|
||||||
testActions(item.trim());
|
await testActions(action.trim());
|
||||||
});
|
}
|
||||||
|
|
||||||
function testActions(action) {
|
async function testActions(action) {
|
||||||
if (ALLACTIONS.includes(action)) {
|
if (ALLACTIONS.includes(action)) {
|
||||||
choseActions(action);
|
await choseActions(action);
|
||||||
} else {
|
} else {
|
||||||
core.setFailed('This actions not supported!');
|
core.setFailed(`Actions: [${action}] is not supported!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user