🚀 fix action

This commit is contained in:
platane
2020-07-20 10:18:24 +02:00
parent a4ea2a4a46
commit 8a06b668cd
9 changed files with 58 additions and 29 deletions

View File

@@ -1,3 +0,0 @@
!dist
!dist/build
out.gif

View File

@@ -4,15 +4,14 @@ import { generateContributionSnake } from "./generateContributionSnake";
(async () => {
try {
console.log(core.getInput("user_name"));
console.log(core.getInput("gif_out_path"));
console.log("--");
console.log(process.cwd());
console.log("--");
console.log(fs.readdirSync(process.cwd()));
const userName = core.getInput("github_user_name");
const gifOutPath = core.getInput("gif_out_path");
const buffer = await generateContributionSnake(core.getInput("user_name"));
fs.writeFileSync(core.getInput("gif_out_path"), buffer);
const buffer = await generateContributionSnake(userName);
fs.writeFileSync(gifOutPath, buffer);
console.log(`::set-output name=gif_out_path::${gifOutPath}`);
} catch (e) {
core.setFailed(`Action failed with "${e.message}"`);
}

View File

@@ -1 +0,0 @@
out.gif