f45685208f
Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com> Co-authored-by: Gregor Martynus <gr2m@users.noreply.github.com>
24 lines
601 B
JavaScript
24 lines
601 B
JavaScript
// @ts-check
|
|
|
|
import core from "@actions/core";
|
|
import { createAppAuth } from "@octokit/auth-app";
|
|
import { request } from "@octokit/request";
|
|
|
|
import { main } from "./lib/main.js";
|
|
|
|
if (!process.env.GITHUB_REPOSITORY) {
|
|
throw new Error("GITHUB_REPOSITORY missing, must be set to '<owner>/<repo>'");
|
|
}
|
|
|
|
const appId = core.getInput("app_id");
|
|
const privateKey = core.getInput("private_key");
|
|
|
|
const repository = process.env.GITHUB_REPOSITORY;
|
|
|
|
main(appId, privateKey, repository, core, createAppAuth, request).catch(
|
|
(error) => {
|
|
console.error(error);
|
|
core.setFailed(error.message);
|
|
}
|
|
);
|