Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 7caaca4

Browse files
committed
Add more flexible hadolint scan
Added a more flexible script for running hadolint as part of the github actions workflow. This version will actively look for all Dockerfiles to be found in the repo and scan them. The scan will fail if any issue is found in any Dockerfile. This should ensure that PRs with new Dockerfiles will meet the Hadolint standards.
1 parent f395b92 commit 7caaca4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/static-analysis.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ jobs:
1919
name: Hadolint
2020
steps:
2121
- uses: actions/checkout@v2
22-
# Each dockerfile needs to be pointed to individually with this setup
23-
- uses: brpaz/hadolint-action@v1.2.1
24-
with:
25-
dockerfile: deploy/images/Dockerfile
22+
- run: wget -q https://github.com/hadolint/hadolint/releases/download/v2.1.0/hadolint-Linux-x86_64 -O hadolint; chmod +x hadolint ; find . -type f \( -name "Dockerfile*" \) -print0 | xargs -n 1 -0 ./hadolint ;
2623
gofmt-imports:
2724
runs-on: ubuntu-latest
2825
name: Go Fmt and Go Import

0 commit comments

Comments
 (0)