Search in sources :

Example 1 with Context

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;
    }
}
Also used : Context(io.quarkiverse.githubaction.Context) Inputs(io.quarkiverse.githubaction.Inputs)

Aggregations

Context (io.quarkiverse.githubaction.Context)1 Inputs (io.quarkiverse.githubaction.Inputs)1