From 526eb940f41df1e2089db0bfd2a9d66445112efb Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 25 Oct 2024 23:51:53 +0200 Subject: [PATCH] Should lint all dockerfiles correctly --- .github/workflows/dockerfile-hadolint.yml | 28 +++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dockerfile-hadolint.yml b/.github/workflows/dockerfile-hadolint.yml index d1b5ceb2..cc9a2fe2 100644 --- a/.github/workflows/dockerfile-hadolint.yml +++ b/.github/workflows/dockerfile-hadolint.yml @@ -7,21 +7,41 @@ # To get a newer version, you will need to update the SHA. # You can also reference a tag or branch, but the action may change without warning. -name: Lint Dockerfile +name: Lint Dockerfiles on: push: branches: - '**' + jobs: dockerfile_linting: name: Dockerfile linting runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: List Docker directory contents - run: ls -R ./docker - - uses: hadolint/hadolint-action@v3.1.0 + - name: Lint Alpine Dockerfile + uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: ./docker/alpine/Dockerfile.build + config: ./docker/.config/hadolint.yml + - name: Lint Debian Bookworm Dockerfile + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: ./docker/debian-bookworm/Dockerfile.build + config: ./docker/.config/hadolint.yml + - name: Lint Debian Bullseye Dockerfile + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: ./docker/debian-bullseye/Dockerfile.build + config: ./docker/.config/hadolint.yml + - name: Lint Debian Buster Dockerfile + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: ./docker/debian-buster/Dockerfile.build + config: ./docker/.config/hadolint.yml + - name: Lint Debian Buster Self-contained Dockerfile + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: ./docker/debian-buster/selfcontained/Dockerfile config: ./docker/.config/hadolint.yml \ No newline at end of file