From 8472cf34d5bedb79b20f0af448321362f2b99913 Mon Sep 17 00:00:00 2001 From: Nicolas BRIERE Date: Mon, 11 Mar 2024 14:18:07 +0100 Subject: [PATCH] feat: add Dockerfile linter workflow --- .github/workflows/dockerfile-linter.yml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/dockerfile-linter.yml diff --git a/.github/workflows/dockerfile-linter.yml b/.github/workflows/dockerfile-linter.yml new file mode 100644 index 0000000..0859b62 --- /dev/null +++ b/.github/workflows/dockerfile-linter.yml @@ -0,0 +1,41 @@ +name: "Dockerfile linter" + +on: + workflow_call: + inputs: + dockerfile_path: + required: true + type: string + image_name: + required: true + type: string + +jobs: + lint-dockerfile: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + packages: read + actions: read + checks: write + issues: read + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + + - uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: ${{ inputs.dockerfile_path }} + output-file: test-result.json + format: json + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + check_name: "DockerFile Linter - ${{ inputs.image_name }}" + files: | + test-result.json