diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml new file mode 100644 index 0000000..1a3af26 --- /dev/null +++ b/.github/workflows/code-quality.yaml @@ -0,0 +1,29 @@ +--- +name: Code quality +run-name: code-quality-${{ github.event.number }} ${{ github.event.pull_request.title }} + +on: + pull_request: + branches: + - main + +# the `concurrency` settings ensure that not too many CI jobs run in parallel +concurrency: + # group by workflow and ref; the last slightly strange component ensures that for pull + # requests, we limit to 1 concurrent job, but for the master branch we don't + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + + +jobs: + hadolint: + name: Code quality - hadolint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Run hadolint + uses: hadolint/hadolint-action@v3.1.0 + with: + recursive: true