From a7c2d21777b5355710d48cb9917834ccf3865026 Mon Sep 17 00:00:00 2001 From: lepapareil Date: Wed, 30 Nov 2022 16:31:18 +0100 Subject: [PATCH] Add hadolint check --- .github/workflows/check.yml | 3 +++ bin/check/hadolint.sh | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100755 bin/check/hadolint.sh 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}"