🚀 add action config
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal 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
23
action.yml
Normal 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"
|
||||
@@ -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 )"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(""),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user