aaaaa
This commit is contained in:
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
deploy-demo:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- run: sudo apt-get install gifsicle graphicsmagick
|
||||
# - run: sudo apt-get install gifsicle graphicsmagick
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
@@ -15,6 +15,14 @@ jobs:
|
||||
|
||||
- uses: bahmutov/npm-install@v1
|
||||
|
||||
- run: yarn type
|
||||
- run: yarn lint
|
||||
- run: yarn test --ci
|
||||
# - run: yarn type
|
||||
# - run: yarn lint
|
||||
# - run: yarn test --ci
|
||||
# - run: yarn build:lib
|
||||
|
||||
- name: generate-snake-game-from-github-contribution-grid
|
||||
uses: Platane/snk@v0.0.2
|
||||
with:
|
||||
github_user_name: platane
|
||||
|
||||
- run: ls
|
||||
|
||||
@@ -4,7 +4,7 @@ RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends gifsicle graphicsmagick \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY packages/action/dist/* ./github-contribution-grid-snake
|
||||
COPY packages/action/dist/* ./generate-snake-game-from-github-contribution-grid/
|
||||
|
||||
CMD ["node", "github-contribution-grid-snake/index.js"]
|
||||
CMD ["node", "generate-snake-game-from-github-contribution-grid/index.js"]
|
||||
|
||||
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# snk
|
||||
|
||||
Generates a snake game from a github user contributions grid and output a screen capture as gif
|
||||
10
action.yml
10
action.yml
@@ -1,10 +1,10 @@
|
||||
name: "github-contribution-grid-snake"
|
||||
description: ""
|
||||
name: "generate-snake-game-from-github-contribution-grid"
|
||||
description: "Generates a snake game from a github user contributions grid and output a screen capture as gif"
|
||||
author: "platane"
|
||||
|
||||
outputs:
|
||||
gif_out_path:
|
||||
description: ""
|
||||
description: "path of the generated gif"
|
||||
|
||||
runs:
|
||||
using: "docker"
|
||||
@@ -15,9 +15,9 @@ runs:
|
||||
|
||||
inputs:
|
||||
github_user_name:
|
||||
description: ""
|
||||
description: "github user name"
|
||||
required: true
|
||||
gif_out_path:
|
||||
description: ""
|
||||
description: "path of the generated gif"
|
||||
required: false
|
||||
default: "./github-contribution-grid-snake.gif"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "snk",
|
||||
"description": "Generates a snake game from a github user contributions grid and output a screen capture as gif",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"repository": "github:platane/snk",
|
||||
|
||||
@@ -4,12 +4,20 @@ import { generateContributionSnake } from "./generateContributionSnake";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
console.log("argv", process.argv);
|
||||
|
||||
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(core.getInput("user_name"));
|
||||
fs.writeFileSync(core.getInput("gif_out_path"), buffer);
|
||||
|
||||
Reference in New Issue
Block a user