Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfae6bb512 | ||
|
|
720b3bbf12 | ||
|
|
cb4016eda8 | ||
|
|
1a73179465 | ||
|
|
e62d5a56e4 | ||
|
|
6815912b18 | ||
|
|
c78ef253a1 | ||
|
|
efae6f21b5 | ||
|
|
ae99398406 | ||
|
|
505d6ab7f0 | ||
|
|
93fa60a844 | ||
|
|
e5fbdf8cfe | ||
|
|
f2452ed852 | ||
|
|
c4d7bdf2bd | ||
|
|
9b05b7fdaa | ||
|
|
ccbe4e530c | ||
|
|
bc6405aca3 | ||
|
|
fc4e8d4436 | ||
|
|
978ec843d3 | ||
|
|
c713fd8dd3 | ||
|
|
c14ae566e0 | ||
|
|
724bc749a2 |
8
.github/workflows/deploy.yml
vendored
8
.github/workflows/deploy.yml
vendored
@@ -6,22 +6,22 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
deploy-demo:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/setup-node@v1.4.2
|
||||
with:
|
||||
node-version: 14
|
||||
|
||||
- uses: bahmutov/npm-install@v1
|
||||
- uses: bahmutov/npm-install@v1.4.1
|
||||
|
||||
- run: yarn build:demo
|
||||
env:
|
||||
BASE_PATHNAME: "snk"
|
||||
|
||||
- uses: crazy-max/ghaction-github-pages@068e494
|
||||
- uses: crazy-max/ghaction-github-pages@v2.1.1
|
||||
with:
|
||||
target_branch: gh-pages
|
||||
build_dir: packages/demo/dist
|
||||
|
||||
28
.github/workflows/main.yml
vendored
28
.github/workflows/main.yml
vendored
@@ -7,14 +7,26 @@ 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
|
||||
# - uses: actions/setup-node@v1.4.2
|
||||
# with:
|
||||
# node-version: 14
|
||||
|
||||
# - uses: bahmutov/npm-install@v1.4.1
|
||||
|
||||
# - 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@master
|
||||
with:
|
||||
node-version: 14
|
||||
github_user_name: platane
|
||||
|
||||
- uses: bahmutov/npm-install@v1
|
||||
|
||||
- run: yarn type
|
||||
- run: yarn lint
|
||||
- run: yarn test --ci
|
||||
- run: ls
|
||||
- run: ls
|
||||
- run: ls
|
||||
- run: ls
|
||||
- run: ls
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ npm-debug.log*
|
||||
yarn-error.log*
|
||||
dist
|
||||
build
|
||||
out.gif
|
||||
13
Dockerfile
13
Dockerfile
@@ -4,7 +4,16 @@ 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 tsconfig.json package.json yarn.lock /github/platane.aa/
|
||||
COPY packages /github/platane.aa/packages
|
||||
|
||||
CMD ["node", "github-contribution-grid-snake/index.js"]
|
||||
RUN ( \
|
||||
cd /github/platane.aa \
|
||||
&& find . \
|
||||
&& yarn install --frozen-lockfile \
|
||||
&& yarn build:action \
|
||||
&& mv packages/action/dist/* . \
|
||||
&& rm -rf packages tsconfig.json package.json yarn.lock node_modules \
|
||||
)
|
||||
|
||||
CMD ["node", "/github/platane.aa/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
|
||||
16
action.yml
16
action.yml
@@ -1,23 +1,23 @@
|
||||
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"
|
||||
image: "Dockerfile"
|
||||
args:
|
||||
- ${{ inputs.github_user_name }}
|
||||
- ${{ inputs.gif_out_path }}
|
||||
# args:
|
||||
# - ${{ inputs.github_user_name }}
|
||||
# - ${{ inputs.gif_out_path }}
|
||||
|
||||
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",
|
||||
|
||||
3
packages/action/.gitignore
vendored
3
packages/action/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
!dist
|
||||
!dist/build
|
||||
out.gif
|
||||
@@ -4,12 +4,22 @@ 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()));
|
||||
console.log("--");
|
||||
console.log(process.env);
|
||||
|
||||
const buffer = await generateContributionSnake(core.getInput("user_name"));
|
||||
fs.writeFileSync(core.getInput("gif_out_path"), buffer);
|
||||
|
||||
1
packages/gif-creator/.gitignore
vendored
1
packages/gif-creator/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
out.gif
|
||||
Reference in New Issue
Block a user