🚀 add action config

This commit is contained in:
platane
2020-07-19 17:33:28 +02:00
parent 5d8cc80d2c
commit 789a9e885f
5 changed files with 78 additions and 883 deletions

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM node:14-slim
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
CMD ["node", "github-contribution-grid-snake/index.js"]

23
action.yml Normal file
View File

@@ -0,0 +1,23 @@
name: "github-contribution-grid-snake"
description: ""
author: "platane"
outputs:
gif_out_path:
description: ""
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.github_user_name }}
- ${{ inputs.gif_out_path }}
inputs:
github_user_name:
description: ""
required: true
gif_out_path:
description: ""
required: false
default: "./github-contribution-grid-snake.gif"

View File

@@ -17,7 +17,7 @@
"type": "tsc --noEmit",
"lint": "yarn prettier -c '**/*.{ts,js,json,md,yml,yaml}' '!dist/**'",
"test": "jest --verbose --passWithNoTests --no-cache",
"build": "( cd packages/demo ; yarn build )",
"dev": "( cd packages/demo ; yarn dev )"
"build:demo": "( cd packages/demo ; yarn build )",
"build:action": "( cd packages/action ; yarn build )"
}
}

View File

@@ -13,7 +13,7 @@ const config: Configuration = {
entry: "./index",
resolve: { extensions: [".ts", ".js"] },
output: {
path: path.join(__dirname, "../../dist/demo"),
path: path.join(__dirname, "dist", "demo"),
filename: "[contenthash].js",
publicPath: "/" + basePathname.map((x) => x + "/").join(""),
},

922
yarn.lock

File diff suppressed because it is too large Load Diff