Report failing jobs when "all required jobs check" fails (#17433)

You can tell this by looking at the JSON input but that's not quite
friendly enough for me.

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Zanie Blue
2026-01-12 19:09:18 -06:00
committed by GitHub
parent 827edd0740
commit e9755bceb3

View File

@@ -295,4 +295,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Check required jobs passed"
run: echo '${{ toJSON(needs) }}' | jq -e 'all(.[]; .result == "success" or .result == "skipped")' > /dev/null
run: |
failing=$(echo "$NEEDS_JSON" | jq -r 'to_entries[] | select(.value.result != "success" and .value.result != "skipped") | "\(.key): \(.value.result)"')
if [ -n "$failing" ]; then
echo "$failing"
exit 1
fi
env:
NEEDS_JSON: ${{ toJSON(needs) }}