From f69420d0490a53039e74c192e30b344b9672dc6a Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Fri, 28 Jun 2024 17:43:43 +0100 Subject: [PATCH] Consolidate linters with super-linter + enable actionlint. This gets rid of a lot of ugly glue that we'd otherwise have to continue maintaining ourselves. Enable the linters we we running before, plus actionlint. --- .github/workflows/lint.yaml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 5c031dc..862328d 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,23 +1,28 @@ -name: Run linters/fixers +--- +name: Lint on: [push] +permissions: {} jobs: - shellcheck: - name: Shellcheck + superlinter: runs-on: ubuntu-latest + permissions: + contents: read + packages: read + statuses: write steps: - uses: actions/checkout@v4 with: + fetch-depth: 0 show-progress: false - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 - hadolint: - name: Hadolint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - show-progress: false - - uses: jbergstroem/hadolint-gh-action@eac45b98f6d761309202bd201205a8f8c988bfad # v1.11.0 - with: - dockerfile: '**/*Dockerfile' - error_level: '1' # Fail on warning or above. + - uses: github/super-linter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_BASH: true + VALIDATE_BASH_EXEC: true + VALIDATE_DOCKERFILE_HADOLINT: true + VALIDATE_EDITORCONFIG: true + VALIDATE_ENV: true + VALIDATE_GITHUB_ACTIONS: true + VALIDATE_JSON: true + VALIDATE_MARKDOWN: true + VALIDATE_YAML: true