Skip to content

Commit 43bcf28

Browse files
committed
fix(gha): validate-dockerfiles more permissive
Presently, we use a `find . -name Dockerfile` to find files to lint with `Hadolint`. With the move to remove chained builds - our Dockerfiles now have extensions that help differentiate what (if any) accelerator they are built for. As a result, all of our Dockerfiles now have file extensions - which means the current code doesn't find them. A simple `find . -name "Dockerfile*"` (adding a `*`) resolves this problem. Note: Once we onboard into Konflux - we will also have `Dockerfile.konflux` files. I have made the decision to **include** them in our linting (as they are part of our repo). However, if that causes issue in the future - the following command could be used: - `find . -name "Dockerfile*" -not -name "Dockerfile.konflux"` Related-to: https://issues.redhat.com/browse/RHOAIENG-19048
1 parent 8381f4c commit 43bcf28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: .github/workflows/code-quality.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
&& wget --output-document=hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 \
119119
&& chmod a+x hadolint
120120
echo "Starting Hadolint"
121-
find . -name "Dockerfile" | xargs ./hadolint --config ./ci/hadolint-config.yaml
121+
find . -name "Dockerfile*" | xargs ./hadolint --config ./ci/hadolint-config.yaml
122122
echo "Hadolint done"
123123
124124
# This simply checks that the manifests and respective kustomization.yaml finishes without an error.

0 commit comments

Comments
 (0)