mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 10:15:59 +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 actionsArr = actions.split(',');
|
||||
actionsArr.forEach(item => {
|
||||
testActions(item.trim());
|
||||
});
|
||||
for (const action of actionsArr) {
|
||||
await testActions(action.trim());
|
||||
}
|
||||
|
||||
function testActions(action) {
|
||||
async function testActions(action) {
|
||||
if (ALLACTIONS.includes(action)) {
|
||||
choseActions(action);
|
||||
await choseActions(action);
|
||||
} else {
|
||||
core.setFailed('This actions not supported!');
|
||||
core.setFailed(`Actions: [${action}] is not supported!`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user