From 724bc749a2ae8e4fc422ed354cebd99c713d97d1 Mon Sep 17 00:00:00 2001 From: platane Date: Sun, 19 Jul 2020 18:14:53 +0200 Subject: [PATCH] aaaaa --- .github/workflows/deploy.yml | 2 +- .github/workflows/main.yml | 16 ++++++++++++---- Dockerfile | 4 ++-- README.md | 3 +++ action.yml | 10 +++++----- package.json | 1 + packages/action/index.ts | 8 ++++++++ 7 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17cde4e..fa793d5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,7 +6,7 @@ on: - master jobs: - test: + deploy-demo: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14cc7c4..94d420c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 5ecdfd2..63e6e19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..b475374 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# snk + +Generates a snake game from a github user contributions grid and output a screen capture as gif diff --git a/action.yml b/action.yml index b345194..5d423e8 100644 --- a/action.yml +++ b/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" diff --git a/package.json b/package.json index 96b278f..4200073 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/action/index.ts b/packages/action/index.ts index 0847551..6221dd4 100644 --- a/packages/action/index.ts +++ b/packages/action/index.ts @@ -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);