Add hadolint check

This commit is contained in:
lepapareil 2022-11-30 16:31:18 +01:00
parent 8b2d7b758d
commit a7c2d21777
No known key found for this signature in database
GPG Key ID: F4F06B068FB00692
2 changed files with 11 additions and 0 deletions

View File

@ -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

8
bin/check/hadolint.sh Executable file
View File

@ -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}"