Skip to content

Commit

Permalink
refactor: use docker action for more performance
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed Nov 17, 2020
1 parent 79fa599 commit e42b4ae
Show file tree
Hide file tree
Showing 8 changed files with 12,227 additions and 5,747 deletions.
4 changes: 4 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

docker build . -t hokify/pull-request-name-linter

docker push hokify/pull-request-name-linter
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:14-alpine

RUN apk --no-cache add git

COPY package*.json /

RUN npm ci --production

COPY . .

ENTRYPOINT ["/entrypoint.sh"]
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ inputs:
default: './commitlint.config.js'
runs:
using: docker
image: docker://wagoid/commitlint-github-action:2.1.1
main: 'dist/index.js'
image: docker://hokify/pull-request-name-linter:latest
branding:
icon: 'users'
color: 'blue'
11 changes: 11 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -e

if [ -z "$NODE_PATH" ]; then
export NODE_PATH=/node_modules
else
export NODE_PATH=$NODE_PATH:/node_modules
fi

node /run.js
12,172 changes: 12,172 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

43 changes: 26 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,36 @@
"devDependencies": {
"@commitlint/types": "11.0.0",
"@types/jest": "26.0.15",
"@types/node": "12.12.37",
"@typescript-eslint/parser": "4.6.0",
"@vercel/ncc": "0.24.1",
"eslint": "7.12.1",
"eslint-plugin-github": "3.4.1",
"eslint-plugin-jest": "23.20.0",
"@types/node": "14.14.7",
"@typescript-eslint/parser": "4.8.1",
"@vercel/ncc": "0.25.1",
"eslint": "7.13.0",
"eslint-plugin-github": "4.1.1",
"eslint-plugin-jest": "24.1.3",
"eslint-plugin-prettier": "3.1.4",
"jest": "25.5.3",
"jest-circus": "25.5.3",
"jest": "26.6.3",
"jest-circus": "26.6.3",
"js-yaml": "3.14.0",
"prettier": "2.1.2",
"ts-jest": "25.4.0",
"typescript": "3.9.7"
"ts-jest": "26.4.4",
"typescript": "4.0.5"
},
"dependencies": {
"@actions/core": "1.2.6",
"@actions/github": "4.0.0",
"@commitlint/lint": "11.0.0",
"@commitlint/load": "11.0.0"
},
"resolutions": {
"import-fresh": "JulienKode/import-fresh#fix/issue-when-there-no-parent-module"
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0",
"@commitlint/config-angular": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/config-lerna-scopes": "^11.0.0",
"@commitlint/config-patternplate": "^11.0.0",
"@commitlint/format": "^11.0.0",
"@commitlint/lint": "^11.0.0",
"@commitlint/load": "^11.0.0",
"commitlint-config-jira": "^1.4.1",
"commitlint-plugin-jira-rules": "^1.4.0",
"conventional-changelog-lint-config-canonical": "^1.0.0",
"dargs": "^7.0.0",
"execa": "^4.1.0",
"lerna": "^3.22.1",
"uuid": "^8.3.1"
}
}
2 changes: 2 additions & 0 deletions run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

require('./dist/index')
Loading

0 comments on commit e42b4ae

Please sign in to comment.