Created
September 24, 2025 16:47
-
-
Save hidakatsuya/700a3f22fad33d36d978eeebc7a61d37 to your computer and use it in GitHub Desktop.
Get Redmine system test failures from GitHub Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| REPO="redmine/redmine" | |
| WORKFLOW_NAME="Tests" | |
| LIMIT=100 | |
| run_ids=$(gh run list --workflow="$WORKFLOW_NAME" --limit "$LIMIT" --repo "$REPO" --json databaseId -q '.[].databaseId') | |
| echo "Checking system test jobs for non-zero exit codes..." | |
| for run_id in $run_ids; do | |
| job_id=$(gh run view "$run_id" --repo "$REPO" --json jobs -q '.jobs[] | select(.name=="system test") | .databaseId') | |
| if [ -z "$job_id" ]; then | |
| continue | |
| fi | |
| if gh run view "$run_id" --job "$job_id" --repo "$REPO" | grep -q "Process completed with exit code [^0]"; then | |
| echo "Run ID: $run_id, Job ID: $job_id FAILED" | |
| echo "https://github.com/$REPO/actions/runs/$run_id/job/$job_id" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment