Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
deploy-demo:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1.4.2
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1.4.1
|
||||||
|
|
||||||
- run: yarn build:demo
|
- run: yarn build:demo
|
||||||
env:
|
env:
|
||||||
BASE_PATHNAME: "snk"
|
BASE_PATHNAME: "snk"
|
||||||
|
|
||||||
- uses: crazy-max/ghaction-github-pages@068e494
|
- uses: crazy-max/ghaction-github-pages@v2.1.1
|
||||||
with:
|
with:
|
||||||
target_branch: gh-pages
|
target_branch: gh-pages
|
||||||
build_dir: packages/demo/dist
|
build_dir: packages/demo/dist
|
||||||
|
|||||||
26
.github/workflows/main.yml
vendored
26
.github/workflows/main.yml
vendored
@@ -7,14 +7,24 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: sudo apt-get install gifsicle graphicsmagick
|
# - run: sudo apt-get install gifsicle graphicsmagick
|
||||||
- uses: actions/checkout@v1
|
- 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:
|
with:
|
||||||
node-version: 14
|
github_user_name: platane
|
||||||
|
|
||||||
- uses: bahmutov/npm-install@v1
|
- run: ls
|
||||||
|
- run: ls
|
||||||
- run: yarn type
|
- run: ls
|
||||||
- run: yarn lint
|
|
||||||
- run: yarn test --ci
|
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules
|
|||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
|
out.gif
|
||||||
10
Dockerfile
10
Dockerfile
@@ -4,7 +4,13 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends gifsicle graphicsmagick \
|
&& apt-get install -y --no-install-recommends gifsicle graphicsmagick \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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/
|
||||||
|
|
||||||
CMD ["node", "github-contribution-grid-snake/index.js"]
|
RUN ( cd /github/platane.aa/ ; yarn install --frozen-lockfile )
|
||||||
|
|
||||||
|
RUN ( cd /github/platane.aa/ ; yarn build:action )
|
||||||
|
|
||||||
|
CMD ["find", "/github"]
|
||||||
|
# CMD ["node", "./generate-snake-game-from-github-contribution-grid/packages/action/dist/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"
|
name: "generate-snake-game-from-github-contribution-grid"
|
||||||
description: ""
|
description: "Generates a snake game from a github user contributions grid and output a screen capture as gif"
|
||||||
author: "platane"
|
author: "platane"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
gif_out_path:
|
gif_out_path:
|
||||||
description: ""
|
description: "path of the generated gif"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "docker"
|
using: "docker"
|
||||||
image: "Dockerfile"
|
image: "Dockerfile"
|
||||||
args:
|
# args:
|
||||||
- ${{ inputs.github_user_name }}
|
# - ${{ inputs.github_user_name }}
|
||||||
- ${{ inputs.gif_out_path }}
|
# - ${{ inputs.gif_out_path }}
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
github_user_name:
|
github_user_name:
|
||||||
description: ""
|
description: "github user name"
|
||||||
required: true
|
required: true
|
||||||
gif_out_path:
|
gif_out_path:
|
||||||
description: ""
|
description: "path of the generated gif"
|
||||||
required: false
|
required: false
|
||||||
default: "./github-contribution-grid-snake.gif"
|
default: "./github-contribution-grid-snake.gif"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "snk",
|
"name": "snk",
|
||||||
|
"description": "Generates a snake game from a github user contributions grid and output a screen capture as gif",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": "github:platane/snk",
|
"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,20 @@ import { generateContributionSnake } from "./generateContributionSnake";
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
|
console.log("argv", process.argv);
|
||||||
|
|
||||||
console.log(core.getInput("user_name"));
|
console.log(core.getInput("user_name"));
|
||||||
console.log(core.getInput("gif_out_path"));
|
console.log(core.getInput("gif_out_path"));
|
||||||
console.log("--");
|
console.log("--");
|
||||||
|
console.log("--");
|
||||||
console.log(process.cwd());
|
console.log(process.cwd());
|
||||||
console.log("--");
|
console.log("--");
|
||||||
console.log(fs.readdirSync(process.cwd()));
|
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"));
|
const buffer = await generateContributionSnake(core.getInput("user_name"));
|
||||||
fs.writeFileSync(core.getInput("gif_out_path"), buffer);
|
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