Skip to content

Commit 28707df

Browse files
committed
Pass the job if no warnings
1 parent ec63cc3 commit 28707df

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

script.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ for docker_file in "${docker_files[@]}" ; do
5555
echo "::group:: result of build --check"
5656
echo "$check_result"
5757
echo "::endgroups::"
58+
warnings=$(echo "$check_result" | jq '.warnings')
59+
if [[ "$warnings" == "null" ]]; then
60+
echo "No warnings found in ${docker_file}"
61+
continue
62+
fi
5863
echo "$check_result" | jq "$docker_build_jq" \
5964
| reviewdog -f=rdjson -name="docker-build-check" \
6065
-reporter="${INPUT_REPORTER}" \

testdata/no_warnings/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM alpine
File renamed without changes.

0 commit comments

Comments
 (0)