name: "Lint"

on:
  pull_request:
    branches: [ "*" ]
  push:
    branches:
      - master

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: recursive

      - name: Hadolint
        run: |
          make hadolint
        env:
          HADOLINT_VERSION: 2.4.1

      - name: ShellCheck
        run: |
          make shellcheck
        env:
          SHELLCHECK_VERSION: 0.8.0

      - name: ECLint
        run: |
          make eclint
        env:
          ECLINT_VERSION: 2.3.5