summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-08-02 21:06:34 +0100
committerGitHub <noreply@github.com>2021-08-02 21:06:34 +0100
commita6ea32a79893b6ee694d036f3bc29a02a79d51e8 (patch)
treef695ef4c90dc8e698f6793b47a1159a33a8bf307 /.github/workflows
parentFix codestyle CI from #10440 (#10511) (diff)
downloadsynapse-a6ea32a79893b6ee694d036f3bc29a02a79d51e8.tar.xz
Fix the `tests-done` github actions step, again (#10512)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/tests.yml21
1 files changed, 12 insertions, 9 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 0a62c62d02..239553ae13 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -367,13 +367,16 @@ jobs:
       - name: Set build result
         env:
           NEEDS_CONTEXT: ${{ toJSON(needs) }}
-        # the `jq` incantation dumps out a series of "<job> <result>" lines
+        # the `jq` incantation dumps out a series of "<job> <result>" lines.
+        # we set it to an intermediate variable to avoid a pipe, which makes it
+        # hard to set $rc.
         run: |
-          set -o pipefail
-          jq -r 'to_entries[] | [.key,.value.result] | join(" ")' \
-                          <<< $NEEDS_CONTEXT |
-              while read job result; do
-                  if [ "$result" != "success" ]; then
-                      echo "::set-failed ::Job $job returned $result"
-                  fi
-              done
+          rc=0
+          results=$(jq -r 'to_entries[] | [.key,.value.result] | join(" ")' <<< $NEEDS_CONTEXT)
+          while read job result ; do
+              if [ "$result" != "success" ]; then
+                  echo "::set-failed ::Job $job returned $result"
+                  rc=1
+              fi
+          done <<< $results
+          exit $rc