Added RuboCop.

This commit is contained in:
Koen Rouwhorst 2019-01-05 18:05:05 +01:00
parent 4bd28abf67
commit 95f2848616
3 changed files with 32 additions and 3 deletions

View file

@ -1,9 +1,13 @@
# GitHub actions # GitHub actions
Some GitHub actions that I use in my projects. A collection of GitHub actions that I use in my projects.
## Actions ## Actions
### eslint ### ESLint
JavaScript linter. ESLint is a JavaScript linter.
### RuboCop
RuboCop is a Ruby static code analyzer and code formatter.

20
rubocop/Dockerfile Normal file
View file

@ -0,0 +1,20 @@
FROM ruby:2.6.0-alpine3.8@sha256:2b4d28f53aa285e5566963c5592a365bfbdd7b38a8f53550ca1ef5fe00b10fd4
LABEL repository="https://github.com/koenrh/rubocop-action"
LABEL maintainer="Koen Rouwhorst <info@koenrouwhorst.nl>"
LABEL "com.github.actions.name"="RuboCop"
LABEL "com.github.actions.description"="RuboCop is a Ruby static code analyzer and code formatter."
LABEL "com.github.actions.icon"="flag"
LABEL "com.github.actions.color"="red"
RUN apk add --no-cache \
build-base=~0.5
RUN addgroup -S rubocop && \
adduser -S -g rubocop rubocop
RUN gem install rubocop --no-document
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

5
rubocop/entrypoint.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
set -e
sh -c "rubocop $*"