Add then action for promise

This commit is contained in:
koeneijkemans 2020-07-05 08:46:24 +02:00
parent 13f46ab513
commit ac9e9d46b0

View File

@ -2,12 +2,8 @@ const core = require('@actions/core');
const execlib = require('@actions/exec'); const execlib = require('@actions/exec');
try { try {
const branchName = getBranchName(); getBranchName()
core.setOutput("branchname", branchName); .then(name => core.setOutput("branchname", name));
if (branchName) {
console.log('We got it! : ' + branchName);
}
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
} }