Skip to content

Commit a027487

Browse files
committed
fix ci file
1 parent 4b5cf2a commit a027487

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,7 @@ jobs:
4141
if: steps.build.outputs.exit_code != '0'
4242
run: |
4343
author="@${{ github.event.pull_request.user.login }}"
44-
errors=""
45-
in_block=0
46-
47-
while IFS= read -r line; do
48-
if [[ "$line" == *"[INFO] Starting audit"* ]]; then
49-
in_block=1
50-
continue
51-
fi
52-
if [[ "$line" == *"Audit done."* ]]; then
53-
in_block=0
54-
continue
55-
fi
56-
if [[ $in_block -eq 1 && "${line#"${line%%[![:space:]]*}"}" == Error:* ]]; then
57-
errors+="${line#"${line%%[![:space:]]*}"}"$'\n'
58-
fi
59-
done < build_output.txt
44+
errors=$(sed -n '/\[INFO\] Starting audit/,/Audit done/ { /^[[:space:]]*Error:/p }' build_output.txt)
6045
6146
if [ -n "$errors" ]; then
6247
{

0 commit comments

Comments
 (0)