diff --git a/.github/workflows/basic-linters.yml b/.github/workflows/basic-linters.yml index 2abf51f..0f31bbd 100644 --- a/.github/workflows/basic-linters.yml +++ b/.github/workflows/basic-linters.yml @@ -16,12 +16,41 @@ jobs: - name: โคต๏ธ Check out code uses: actions/checkout@v2 + - name: ๐Ÿ” Find YAML + id: find-yaml + uses: DovnarAlexander/github-action-file-detection@v0.3.0 + with: + wildcard: "*.y*ml" + exit_code_not_found: 0 + - name: ๐Ÿ“ฅ Download default yamllint configuration + if: steps.find-yaml.outputs.found != '' uses: valitydev/action-download-file@v1 with: url: https://raw.githubusercontent.com/valitydev/configurations/v1/linters/.yamllint - name: ๐Ÿš€ Run yamllint + if: steps.find-yaml.outputs.found != '' uses: frenck/action-yamllint@v1 with: warnings: false + + hadolint: + name: hadolint + runs-on: ubuntu-latest + steps: + - name: โคต๏ธ Check out code + uses: actions/checkout@v2 + + - name: ๐Ÿ” Find Dockerfile + id: find-dockerfile + uses: DovnarAlexander/github-action-file-detection@v0.3.0 + with: + wildcard: "*Dockerfile*" + exit_code_not_found: 0 + + - name: ๐Ÿš€ Run hadolint + if: steps.find-dockerfile.outputs.found != '' + uses: reviewdog/action-hadolint@v1 + with: + filter_mode: nofilter