From d38929c181c032bdee0d37d2a547cd477a8c4fc4 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 22 Jan 2022 19:25:39 +0100 Subject: [PATCH] Create lint-checks.yaml --- .github/workflows/lint-checks.yaml | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/lint-checks.yaml diff --git a/.github/workflows/lint-checks.yaml b/.github/workflows/lint-checks.yaml new file mode 100644 index 000000000..91cde1f17 --- /dev/null +++ b/.github/workflows/lint-checks.yaml @@ -0,0 +1,58 @@ +name: Lint / Syntax checks +on: + pull_request: + branches: + - master + +jobs: + hadolint: + runs-on: ubuntu-latest + container: ghcr.io/hadolint/hadolint:latest-alpine + steps: + - name: â†Šī¸ Checkout + uses: actions/checkout@v2 + + - name: 📂 Detect chanced files + id: filter + uses: dorny/paths-filter@v2.9.0 + with: + list-files: 'shell' + filters: | + dockerfile: + - '**/Dockerfile' + - name: 🔎 Run hadolint + if: steps.filter.outputs.dockerfile == 'true' + run: hadolint ${{ steps.filter.outputs.dockerfile_files }} + + shellcheck: + runs-on: ubuntu-latest + steps: + - name: â†Šī¸ Checkout + uses: actions/checkout@v2 + + - name: 📂 Detect chanced files + id: filter + uses: dorny/paths-filter@v2.9.0 + with: + list-files: 'shell' + filters: | + shell: + - '**/*.sh' + - '**/cont-init.d/*' + - '**/services.d/*' + - name: 🔎 Run ShellCheck + if: steps.filter.outputs.shell == 'true' + uses: ludeeus/action-shellcheck@1.1.0 + with: + additional_files: ${{ steps.filter.outputs.shell_files }} + + markdownlint: + runs-on: ubuntu-latest + steps: + - name: â†Šī¸ Checkout + uses: actions/checkout@v2 + + - name: 🔎 Run markdownlint + uses: nosborn/github-action-markdown-cli@v1.1.1 + with: + files: .