mirror of
https://github.com/diligencia/semantic-branch-version.git
synced 2024-11-23 13:33:51 +08:00
Add then action for promise
This commit is contained in:
parent
13f46ab513
commit
ac9e9d46b0
8
index.js
8
index.js
@ -2,12 +2,8 @@ const core = require('@actions/core');
|
||||
const execlib = require('@actions/exec');
|
||||
|
||||
try {
|
||||
const branchName = getBranchName();
|
||||
core.setOutput("branchname", branchName);
|
||||
|
||||
if (branchName) {
|
||||
console.log('We got it! : ' + branchName);
|
||||
}
|
||||
getBranchName()
|
||||
.then(name => core.setOutput("branchname", name));
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user