Skip to content

Commit 48727ed

Browse files
committed
fix: agentic workflow waits for in-progress CI
1 parent 3ae9879 commit 48727ed

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.50.1": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.50.1",
11+
"sha": "fad43e3c91a4e1d43e458f68e96574127934e7d1"
12+
}
13+
}
14+
}

.github/workflows/fix-pr-pass-ci.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,20 @@ Because PG18 uses `continue-on-error`, the overall CI status can appear **green
6262
gh run list --branch "$BRANCH" --workflow ci.yml --limit 5 --json databaseId,status,conclusion
6363
```
6464

65-
3. Check **individual job conclusions** (not just the overall run conclusion):
65+
3. **If the latest CI run is still `in_progress`**, wait for it to finish before proceeding. Poll every 30 seconds:
66+
```
67+
gh run watch <run-id> --exit-status || true
68+
```
69+
This blocks until the run completes. The `|| true` ensures you continue even if the run fails (which is expected).
70+
71+
4. Check **individual job conclusions** (not just the overall run conclusion):
6672
```
6773
gh run view <run-id> --json jobs --jq '.jobs[] | {name, conclusion, status}'
6874
```
6975

70-
4. Classify each job as `success`, `failure`, or `skipped`.
76+
5. Classify each job as `success`, `failure`, or `skipped`.
7177

72-
5. If ALL jobs succeeded (including PG18), call the `noop` safe output with a message that CI is already passing and stop.
78+
6. If ALL jobs succeeded (including PG18), call the `noop` safe output with a message that CI is already passing and stop.
7379

7480
### Phase 2: Fix PG17 Failures First
7581

0 commit comments

Comments
 (0)