Skip to content

feat: Add docker linter #2

feat: Add docker linter

feat: Add docker linter #2

Workflow file for this run

name: PR-verify
on:
pull_request:
branches:
- main
jobs:
changed-files:
name: Detect changed dockerfiles
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed dockerfiles
id: changed-files
uses: tj-actions/changed-files@v44
with:
matrix: true
files: |
Dockerfile
lint-dockerfiles:
name: Lint dockerfiles with hadolint
runs-on: ubuntu-latest
needs: [changed-files]
strategy:
matrix:
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
max-parallel: 4
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run hadolint
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ${{ matrix.files }}