@@ -102,19 +102,19 @@ jobs:
102102 steps :
103103 - name : Check out a copy of the git repository
104104 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105- with :
106- fetch-depth : 0
107105
108106 - name : Run hadolint on Dockerfiles
109107 continue-on-error : ${{inputs.soft-linting == 'true'}}
110108 env :
111- hadolint_version : ' sha256:e9dbf5113239ef2bf696d20c8f28d3019a47c26a38c98b89344d3e2846c4d5f8'
109+ sha : ' sha256:e9dbf5113239ef2bf696d20c8f28d3019a47c26a38c98b89344d3e2846c4d5f8'
112110 run : |
113111 echo '::add-matcher::.github/problem-matchers/hadolint.json'
114- find . -name Dockerfile -print0 | \
115- xargs -0 -r docker run --rm -i -v "${PWD}:/app" -w /app \
116- --entrypoint /bin/hadolint \
117- ghcr.io/hadolint/hadolint@${{env.hadolint_version}}
112+ shopt -s globstar
113+ files=(**/Dockerfile*)
114+ if [[ ${#files[@]} -gt 0 ]]; then
115+ docker run --rm -v "${PWD}:/app" -w /app \
116+ ghcr.io/hadolint/hadolint@${{env.sha}} /bin/hadolint "${files[@]}"
117+ fi
118118
119119 shell-lint :
120120 name : Shell script lint checks
@@ -124,8 +124,6 @@ jobs:
124124 steps :
125125 - name : Check out a copy of the git repository
126126 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
127- with :
128- fetch-depth : 0
129127
130128 - name : Install problem matcher
131129 run : echo '::add-matcher::.github/problem-matchers/shellcheck.json'
@@ -147,8 +145,6 @@ jobs:
147145 steps :
148146 - name : Check out a copy of the git repository
149147 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
150- with :
151- fetch-depth : 0
152148
153149 - name : Install yamllint
154150 run : |
@@ -159,10 +155,7 @@ jobs:
159155 continue-on-error : ${{inputs.soft-linting == 'true'}}
160156 run : |
161157 echo "::add-matcher::.github/problem-matchers/yamllint.json"
162- # shellcheck disable=SC2038
163- find . -not -path '*.github/workflows/*' \
164- '(' -name '*.yaml' -o -name '*.yml' ')' | \
165- xargs yamllint -f github
158+ yamllint -f github . CITATION.cff
166159
167160 bazel-lint :
168161 name : Bazel build lint checks
@@ -172,8 +165,6 @@ jobs:
172165 steps :
173166 - name : Check out a copy of the git repository
174167 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
175- with :
176- fetch-depth : 0
177168
178169 - name : Install Buildifier
179170 uses : jbajic/setup-buildifier@c558ee05c6f74ab5753ff794516750b4aadac296 # v1
@@ -184,9 +175,7 @@ jobs:
184175 continue-on-error : ${{inputs.soft-linting == 'true'}}
185176 run : |
186177 echo '::add-matcher::.github/problem-matchers/buildifier.json'
187- # shellcheck disable=SC2038
188- find . -name 'BUILD' -o -name '*.bzl' -o -name 'WORKSPACE' | \
189- xargs buildifier -mode=diff -lint=warn
178+ buildifier -mode=diff -lint=warn -r .
190179
191180 action-lint :
192181 name : GitHub Actions lint checks
@@ -196,8 +185,6 @@ jobs:
196185 steps :
197186 - name : Check out a copy of the git repository
198187 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
199- with :
200- fetch-depth : 0
201188
202189 - name : Run actionlint
203190 continue-on-error : ${{inputs.soft-linting == 'true'}}
0 commit comments