From e416342ace61390192b2f81ca72ac3b4005e35b5 Mon Sep 17 00:00:00 2001 From: Koen Rouwhorst Date: Sat, 5 Jan 2019 15:52:19 +0100 Subject: [PATCH] Added eslint action. --- README.md | 10 +++++++++- eslint/Dockerfile | 21 +++++++++++++++++++++ eslint/entrypoint.sh | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 eslint/Dockerfile create mode 100755 eslint/entrypoint.sh diff --git a/README.md b/README.md index 5fbea38..ab442f1 100644 --- a/README.md +++ b/README.md @@ -1 +1,9 @@ -# actions \ No newline at end of file +# GitHub actions + +Some GitHub actions that I use in my projects. + +## Actions + +### eslint + +JavaScript linter. diff --git a/eslint/Dockerfile b/eslint/Dockerfile new file mode 100644 index 0000000..12c4a7e --- /dev/null +++ b/eslint/Dockerfile @@ -0,0 +1,21 @@ +FROM node:8.15.0-alpine@sha256:f30a55706c7336a648493b926128f56176e4500cfdc968764bfdb711716e0109 + +LABEL name="ESLint" +LABEL maintainer="Koen Rouwhorst " + +LABEL "com.github.actions.name"="GitHub Action for ESLint" +LABEL "com.github.actions.icon"="code" +LABEL "com.github.actions.color"="blue" + +ENV ESLINT_VERSION=5.11.1 \ + PATH=/usr/lib/node_modules/.bin:$PATH + +RUN npm install -g eslint@${ESLINT_VERSION} && \ + rm -rf /usr/share/man /tmp/* \ + /root/.npm /root/.node-gyp \ + /usr/lib/node_modules/npm/man \ + /usr/lib/node_modules/npm/doc \ + /usr/lib/node_modules/npm/html + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/eslint/entrypoint.sh b/eslint/entrypoint.sh new file mode 100755 index 0000000..8ec6191 --- /dev/null +++ b/eslint/entrypoint.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +sh -c "eslint $*"