Skip to content

Commit 4f6800c

Browse files
committed
fix ci file
1 parent 302afb7 commit 4f6800c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/pr-java-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ jobs:
4141
if: steps.build.outputs.exit_code != '0'
4242
run: |
4343
author="@${{ github.event.pull_request.user.login }}"
44-
errors=$(sed -n '/Starting audit/,/Audit done/ { /Error:/p }' build_output.txt)
4544
46-
if [ -n "$errors" ]; then
45+
audit_block=$(sed -n '/Starting audit\.\.\./,/Audit done\./p' build_output.txt)
46+
47+
if echo "$audit_block" | grep -q '^\[ERROR\]'; then
4748
{
4849
echo "${author}, some Checkstyle issues were found"
4950
echo "**❌ Checkstyle Issues Detected**"
5051
echo ""
5152
echo '```'
52-
echo "$errors"
53+
echo "$audit_block" | grep '^\[ERROR\]'
5354
echo '```'
5455
} > comment.txt
5556
else

0 commit comments

Comments
 (0)