diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c396096a5..2ace451fe 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -37,6 +37,9 @@ jobs: options: --volume ${{ github.workspace }}:/work:rw --workdir /work --privileged --env CARGO_TERM_COLOR=always run: gitleaks detect --verbose --config .github/workflows/config/gitleaks.toml + - name: Hadolint + run: bin/check/hadolint.sh ./contrib/docker/Dockerfile + - name: Install prerequisites run: bin/check/install_prerequisites.sh diff --git a/bin/check/hadolint.sh b/bin/check/hadolint.sh new file mode 100755 index 000000000..d1e412d5a --- /dev/null +++ b/bin/check/hadolint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -eu + +docker_file="$1" +version="2.12.0" +wget --quiet --output-document /tmp/hadolint "https://github.com/hadolint/hadolint/releases/download/v${version}/hadolint-Linux-x86_64" +chmod +x /tmp/hadolint +/tmp/hadolint --verbose "${docker_file}"