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

Commit

Permalink
Fix the tests-done github actions step, again (#10512)
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh authored Aug 2, 2021
1 parent fb086ed commit a6ea32a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions changelog.d/10512.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the `tests-done` Github Actions status.

0 comments on commit a6ea32a

Please sign in to comment.