fix: action run async (#79)

* fix: for await

* style: perf mess

Co-authored-by: meteorlxy <meteor.lxy@foxmail.com>
This commit is contained in:
xrkffgg
2021-08-13 12:58:11 +08:00
committed by GitHub
parent b5d3740262
commit b395ad434f

View File

@@ -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!`);
} }
} }