From 8e43c5cf57ccbda9142f8b5498c3bac126003d96 Mon Sep 17 00:00:00 2001 From: Stefan Poensgen Date: Sun, 24 Sep 2023 20:34:03 +0200 Subject: [PATCH] feat: add hadolint --- .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d25ba78 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Lint Dockerfile +on: + workflow_dispatch: + pull_request: + paths: + - "Dockerfile.template" + push: + paths: + - "Dockerfile.template" + +jobs: + lint: + name: 'Lint Dockerfile (PHP: ${{ matrix.php-version }})' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: + - '8.0' + - '8.1' + - '8.2' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint Dockerfile + id: hadolint + uses: hadolint/hadolint-action@master + with: + dockerfile: ./${{ matrix.php-version }}/Dockerfile + ignore: DL3018