@@ -73,12 +73,17 @@ jobs:
7373 extra-args : -std=c++14 -Wall
7474
7575 - name : Fail fast?!
76- # if: steps.linter.outputs.checks-failed > 0
76+ # if: ${{ !contains(fromJSON('["0", ""]'), steps.linter.outputs.checks-failed) }}
77+ shell : bash
78+ env :
79+ CHECKS_FAILED : ${{ steps.linter.outputs.checks-failed }}
80+ TIDY_CHECKS_FAILED : ${{ steps.linter.outputs.clang-tidy-checks-failed }}
81+ FORMAT_CHECKS_FAILED : ${{ steps.linter.outputs.clang-format-checks-failed }}
7782 run : |
7883 echo "some linter checks failed"
79- echo "total checks-failed: ${{ steps.linter.outputs.checks-failed }} "
80- echo "clang-tidy checks-failed: ${{ steps.linter.outputs.clang-tidy-checks-failed }} "
81- echo "clang-format checks-failed: ${{ steps.linter.outputs.clang-format-checks-failed }} "
84+ echo "total checks-failed: $CHECKS_FAILED "
85+ echo "clang-tidy checks-failed: $TIDY_CHECKS_FAILED "
86+ echo "clang-format checks-failed: $FORMAT_CHECKS_FAILED "
8287 # for actual deployment
8388 # run: exit 1
8489
@@ -127,6 +132,8 @@ jobs:
127132 step-summary : false
128133
129134 - name : Assert auto-fix committed the formatting changes
135+ env :
136+ FORMAT_CHECKS_FAILED : ${{ steps.linter.outputs.clang-format-checks-failed }}
130137 run : |
131138 set -euo pipefail
132139
@@ -164,7 +171,7 @@ jobs:
164171 exit 1
165172 fi
166173
167- failed='${{ steps.linter.outputs.clang-format-checks-failed }}'
174+ failed="$FORMAT_CHECKS_FAILED"
168175 if [ "${failed:-0}" != "0" ]; then
169176 echo "::error title=auto-fix::clang-format still reports $failed issue(s) after auto-fix"
170177 exit 1
0 commit comments