From 4e3f0512d76e547046851f9a15e2724f02db756c Mon Sep 17 00:00:00 2001 From: Jack Green Date: Sat, 23 Nov 2024 09:09:40 +0000 Subject: [PATCH] Update action.yml --- .github/actions/test-adoc/action.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/actions/test-adoc/action.yml b/.github/actions/test-adoc/action.yml index 4bc948684..7a0a4d6a3 100644 --- a/.github/actions/test-adoc/action.yml +++ b/.github/actions/test-adoc/action.yml @@ -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 @@ -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}"