0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-05-31 17:58:57 +02:00

Fix the tests-done github actions step, again (#10512)

This commit is contained in:
Richard van der Hoff 2021-08-02 21:06:34 +01:00 committed by GitHub
parent fb086edaed
commit a6ea32a798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View file

@ -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
changelog.d/10512.misc Normal file
View file

@ -0,0 +1 @@
Update the `tests-done` Github Actions status.