Skip to content

Commit

Permalink
fix: hadolint doesn't support experimental --exclude flag in dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
janosmiko committed Feb 7, 2025
1 parent c2f1e9e commit cdeda89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/lint-dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ jobs:
- name: Run Hadolint
run: |
set -euo pipefail
find ./images -type f -name "tpl.Dockerfile" -print0 | xargs -I{} -0 /bin/bash -c "echo {}; hadolint <(gomplate -f {} -o -)"
find ./images -type f -name "tpl.Dockerfile" -print0 | xargs -I{} -0 /bin/bash -c "echo {}; hadolint <(gomplate -f {} -o - | sed '/--exclude/d' )"
# workaround for missing --exclude flag handling in hadolint
# https://github.com/hadolint/hadolint/issues/1029
# find ./images -type f -name "tpl.Dockerfile" -print0 | xargs -I{} -0 /bin/bash -c "echo {}; hadolint <(gomplate -f {} -o -)"

0 comments on commit cdeda89

Please sign in to comment.