From 2d4cd8afffcec8b5dfb54bcd2eb7a2cb249c0629 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Fri, 20 Dec 2024 11:17:27 +0100 Subject: [PATCH] lint: Added reviewdog linters --- .github/workflows/reviewdog.yaml | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/reviewdog.yaml diff --git a/.github/workflows/reviewdog.yaml b/.github/workflows/reviewdog.yaml new file mode 100644 index 000000000..ffa0bfa8e --- /dev/null +++ b/.github/workflows/reviewdog.yaml @@ -0,0 +1,90 @@ +name: Reviewdog + +on: + pull_request: + branches: + - main + paths: + - ".github/workflows/reviewdog.yaml" + - "**/Dockerfile" + - "**/Dockerfile.*" + - "**/*.sh" + - "**/*.md" + +permissions: + contents: read + pull-requests: write + +jobs: + hadolint: + name: runner / hadolinter + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Run Hadolint with Reviewdog + uses: reviewdog/action-hadolint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + exclude: | + ./vendor/* + + markdownlint: + name: runner / markdownlint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: markdownlint + uses: reviewdog/action-markdownlint@v0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + markdownlint_flags: --ignore vendor . + + misspell: + name: runner / misspell + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Run Misspell with Reviewdog + uses: reviewdog/action-misspell@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + exclude: | + ./.git/* + ./.cache/* + ./vendor/* + + actionlint: + name: runner / actionlint + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Run Actionlint with Reviewdog + uses: reviewdog/action-actionlint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + fail_on_error: true + + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review + fail_on_error: true + exclude: | + */.git/* + ./vendor/*