Files
snk/packages/action/index.ts
platane b0a6d2e94f aaaa
2020-07-20 09:40:53 +02:00

19 lines
520 B
TypeScript

import * as fs from "fs";
import * as core from "@actions/core";
import { generateContributionSnake } from "./generateContributionSnake";
(async () => {
try {
const userName = core.getInput("github_user_name");
const gifOutPath = core.getInput("gif_out_path");
const buffer = await generateContributionSnake(userName);
console.log({ userName, gifOutPath }, buffer.length);
fs.writeFileSync(gifOutPath, buffer);
} catch (e) {
core.setFailed(`Action failed with "${e.message}"`);
}
})();