Skip to content

Commit

Permalink
Pass the job if no warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shmokmt committed Oct 24, 2024
1 parent ec63cc3 commit 28707df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ for docker_file in "${docker_files[@]}" ; do
echo "::group:: result of build --check"
echo "$check_result"
echo "::endgroups::"
warnings=$(echo "$check_result" | jq '.warnings')
if [[ "$warnings" == "null" ]]; then
echo "No warnings found in ${docker_file}"
continue
fi
echo "$check_result" | jq "$docker_build_jq" \
| reviewdog -f=rdjson -name="docker-build-check" \
-reporter="${INPUT_REPORTER}" \
Expand Down
1 change: 1 addition & 0 deletions testdata/no_warnings/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM alpine
File renamed without changes.

0 comments on commit 28707df

Please sign in to comment.