mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-19 11:27:08 +00:00
fix: use async/await in the runner
This commit is contained in:
parent
cd7e423dd8
commit
e300660370
2 changed files with 14 additions and 13 deletions
18
src/index.ts
18
src/index.ts
|
|
@ -2,14 +2,16 @@ import * as core from '@actions/core';
|
|||
import Input from './input';
|
||||
import Renovate from './renovate';
|
||||
|
||||
function run(): Promise<void> {
|
||||
const input = new Input();
|
||||
const renovate = new Renovate(input.configurationFile, input.token);
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const input = new Input();
|
||||
const renovate = new Renovate(input.configurationFile, input.token);
|
||||
|
||||
return renovate.runDockerContainer();
|
||||
await renovate.runDockerContainer();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
run().catch((error) => {
|
||||
console.error(error);
|
||||
core.setFailed(error.message);
|
||||
});
|
||||
run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue