use of io.quarkiverse.githubaction.Context in project quarkus-github-action by quarkiverse.
the class ActionMain method run.
@Override
public int run(String... args) throws Exception {
try {
Context context = contextInitializer.createContext();
Inputs inputs = inputsInitializer.createInputs();
OutputsImpl outputs = new OutputsImpl();
GitHubEvent gitHubEvent = new GitHubEvent(inputs.getAction(), context, getEventAction(context), inputs, outputs, payloadTypeResolver.getPayloadType(context.getGitHubEventName()));
gitHubEventHandler.handle(gitHubEvent);
outputs.produce();
return 0;
} catch (Exception e) {
LOG.error("An error occured while executing the action", e);
return 1;
}
}