name: Docker Lint

on:
  push:
    branches: [ main, development, 'feature/**' ]
    paths:
      - 'Dockerfile'
  pull_request:
    branches: [ main, development ]
    paths:
      - 'Dockerfile'

jobs:
  hadolint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

      - name: Run Hadolint
        uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
        with:
          dockerfile: Dockerfile
          failure-threshold: warning
