diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml new file mode 100644 index 00000000000..8514c5c7a6e --- /dev/null +++ b/.github/workflows/hadolint.yml @@ -0,0 +1,22 @@ +name: Hadolint +on: pull_request + +jobs: + hadolint: + runs-on: ubuntu-latest + name: Hadolint-your-PR + steps: + - uses: actions/checkout@v4 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v42 + with: + # Pass what names/filters you want to catch + files: | + **/Dockerfile.* + separator: " " + # Only run if expected files are changed and pass these as input + - uses: jbergstroem/hadolint-gh-action@v1 + if: steps.changed-files.outputs.any_changed == 'true' + with: + dockerfile: "${{ steps.changed-files.outputs.other_changed_files }}" \ No newline at end of file diff --git a/.hadolint.yml b/.hadolint.yml new file mode 100644 index 00000000000..0464523a468 --- /dev/null +++ b/.hadolint.yml @@ -0,0 +1,2 @@ +ignored: + - DL3018