Compare commits

...

5 Commits

Author SHA1 Message Date
platane
a9347ab75c aaaa 2020-07-20 09:53:32 +02:00
platane
b0a6d2e94f aaaa 2020-07-20 09:40:53 +02:00
platane
250f0ba420 aaaa 2020-07-20 09:35:29 +02:00
platane
cfae6bb512 aaaa 2020-07-20 09:30:49 +02:00
platane
720b3bbf12 aaaa 2020-07-20 09:24:09 +02:00
3 changed files with 20 additions and 20 deletions

View File

@@ -21,11 +21,21 @@ jobs:
# - run: yarn build:lib
- name: generate-snake-game-from-github-contribution-grid
id: snake-gif
uses: Platane/snk@master
with:
github_user_name: platane
- run: ls
# - uses: crazy-max/ghaction-github-pages@v2.1.1
# with:
# target_branch: gh-pages
# build_dir: packages/demo/dist
# env:
# GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}
- run: ls
- run: ls -l github-contribution-grid-snake.gif
- run: ls -l ${{ steps.snake-gif.outputs.gif_out_path }}
- run: ls
- run: ls
- run: ls

View File

@@ -16,7 +16,4 @@ RUN ( \
&& rm -rf packages tsconfig.json package.json yarn.lock node_modules \
)
CMD ["find", "/github/platane.aa"]
# CMD ["node", "./generate-snake-game-from-github-contribution-grid/packages/action/dist/index.js"]
CMD ["node", "/github/platane.aa/index.js"]

View File

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