Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPGreen authored Nov 23, 2024
1 parent d9bccb9 commit 4e3f051
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/actions/test-adoc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ runs:
- name: Check for errors
shell: ${{ env.shell }}
run: |
set -o errexit ${RUNNER_DEBUG:+-x}
# Builds the adoc file using asciidoctor, discarding the output
# This logs any warnings etc
Expand All @@ -35,19 +37,15 @@ runs:
"include file not found" \
)
result=$?
# Fail the action if there was an unexpected error code, or any output from the build
if [[ ${result} != 0 ]]; then
exit ${result}
elif [[ ${output} ]]; then
# Fail the action if there was any output from the build
if [[ ${output} ]]; then
while IFS= read -r line; do
if [[ "${line}" == *"ERROR"* ]]; then
severity=error
if [[ "${line}" == *"INFO"* ]]; then
severity=info
elif [[ "${line}" == *"WARNING"* ]]; then
severity=warning
else
severity=notice
severity=error
fi
echo "::${severity}::${line}"
Expand Down

0 comments on commit 4e3f051

Please sign in to comment.