diff --git a/README.md b/README.md index ab442f1..d61ef86 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # GitHub actions -Some GitHub actions that I use in my projects. +A collection of GitHub actions that I use in my projects. ## Actions -### eslint +### ESLint -JavaScript linter. +ESLint is a JavaScript linter. + +### RuboCop + +RuboCop is a Ruby static code analyzer and code formatter. diff --git a/rubocop/Dockerfile b/rubocop/Dockerfile new file mode 100644 index 0000000..d6b8f3c --- /dev/null +++ b/rubocop/Dockerfile @@ -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 " + +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"] diff --git a/rubocop/entrypoint.sh b/rubocop/entrypoint.sh new file mode 100755 index 0000000..2d3659b --- /dev/null +++ b/rubocop/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +sh -c "rubocop $*"