diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 38fecb1..0000000 --- a/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM openjdk:8-alpine - -# Specify viewdog version and a stable commit hash -ENV REVIEWDOG_COMMIT=144be8f5064d263cdd674952163da0cebd0247d0 -ENV REVIEWDOG_VERSION=v0.10.0 - -# Grab checkstyle -RUN wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.33/checkstyle-8.33-all.jar > /checkstyle.jar - -# Grab reviewdog -RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/${REVIEWDOG_COMMIT}/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION} - -# Install git -RUN apk add --no-cache git - -# Add the script and checkstyle -COPY entrypoint.sh /entrypoint.sh -COPY checkstyle-circle.xml /checkstyle-circle.xml - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md index b5a4126..59226e6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ # actions-checkstyle -Runs checkstyle using reviewdog on pull requests. - -This configuration is based on https://github.com/nikitasavinov/checkstyle-action, the only difference is that we package our own checkstyle.xml so that it's centrally defined and can be used in all of our repositories. - - +This repository provides a centrally defined checkstyle configurations that individual services reference in their builds. diff --git a/action.yml b/action.yml deleted file mode 100644 index d302be1..0000000 --- a/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -# action.yml -name: 'Run java checkstyle' -description: 'Run java checkstyle with reviewdog' -branding: - icon: 'code' - color: 'red' -inputs: - github_token: - description: 'GITHUB_TOKEN.' - default: '${{ github.token }}' - level: - description: 'Report level for reviewdog [info,warning,error]' - default: 'info' - reporter: - description: 'Reporter of reviewdog command [github-pr-check,github-pr-review]' - default: 'github-pr-check' - checkstyle_config: - description: 'Checkstyle config file' - required: true - default: 'checkstyle-circle.xml' - workdir: - description: 'Working directory relative to the root directory.' - default: '.' - tool_name: - description: 'Tool name to use for reviewdog reporter' - default: 'reviewdog' -runs: - using: 'docker' - image: 'Dockerfile' - diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 21b1bcc..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -echo "Running check" - -export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" - -exec java -jar /checkstyle.jar -c /"${INPUT_CHECKSTYLE_CONFIG}" "${INPUT_WORKDIR}" -f xml \ - | reviewdog -f=checkstyle -name="${INPUT_TOOL_NAME}" -reporter="${INPUT_REPORTER}" -level="${INPUT_LEVEL}"