Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit a6ea32a

Browse files
authored
Fix the tests-done github actions step, again (#10512)
1 parent fb086ed commit a6ea32a

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,16 @@ jobs:
367367
- name: Set build result
368368
env:
369369
NEEDS_CONTEXT: ${{ toJSON(needs) }}
370-
# the `jq` incantation dumps out a series of "<job> <result>" lines
370+
# the `jq` incantation dumps out a series of "<job> <result>" lines.
371+
# we set it to an intermediate variable to avoid a pipe, which makes it
372+
# hard to set $rc.
371373
run: |
372-
set -o pipefail
373-
jq -r 'to_entries[] | [.key,.value.result] | join(" ")' \
374-
<<< $NEEDS_CONTEXT |
375-
while read job result; do
376-
if [ "$result" != "success" ]; then
377-
echo "::set-failed ::Job $job returned $result"
378-
fi
379-
done
374+
rc=0
375+
results=$(jq -r 'to_entries[] | [.key,.value.result] | join(" ")' <<< $NEEDS_CONTEXT)
376+
while read job result ; do
377+
if [ "$result" != "success" ]; then
378+
echo "::set-failed ::Job $job returned $result"
379+
rc=1
380+
fi
381+
done <<< $results
382+
exit $rc

changelog.d/10512.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update the `tests-done` Github Actions status.

0 commit comments

Comments
 (0)