diff --git a/.github/workflows/ci-oci-install.yml b/.github/workflows/ci-oci-install.yml index ed98a922d6c..43e63cdc0b7 100644 --- a/.github/workflows/ci-oci-install.yml +++ b/.github/workflows/ci-oci-install.yml @@ -68,7 +68,7 @@ jobs: run: | set -eux sudo apt-get install -y shellcheck - EXCLUDE_CODES="SC1090,SC2034,SC2046,SC2154" + EXCLUDE_CODES="SC1090,SC2034,SC2046,SC2154,SC2155" find install/OneClickInstall tests -type f -name "*.sh" ! -path "install/OneClickInstall/install-Docker.sh" \ | xargs shellcheck --exclude="$EXCLUDE_CODES" --severity=warning | tee shellcheck_output awk ' @@ -76,9 +76,11 @@ jobs: /\(error\):/ { errors++ } END { warnings += 0; errors += 0; - printf "::%s ::ShellCheck detected %d warnings and %d errors\n" \ - $([ $warnings -gt 0 ] || [ $errors -gt 0 ] && echo "warning" || echo "info") \ - "$warnings" "$errors" + if (warnings > 0 || errors > 0) { + printf "::warning ::ShellCheck detected %d warnings and %d errors\n", warnings, errors + } else { + print "No warnings or errors detected by ShellCheck." + } }' shellcheck_output - name: Determine affected distributions