Description
When a dispatched workflow run enters the pending state (e.g. due to a concurrency group or unavailable runner), the polling loop exits immediately and reports a false warning instead of continuing to wait.
Root Cause
In src/main.ts, the while loop only checks for three statuses:
while (runStatus === 'in_progress' || runStatus === 'queued' || runStatus === 'waiting') {
pending is a valid GitHub Actions run status but is not included. When the API returns pending, the loop exits and falls into the else branch:
} else {
core.warning(`⚠️ Workflow run completed with status: ${runStatus}`)
}
This produces the misleading message:
⚠️ Workflow run completed with status: pending
🎉 Workflow conclusion: null
Expected Behavior
The polling loop should continue waiting when the status is pending, just like it does for queued or waiting.
Suggested Fix
while (
runStatus === 'in_progress' ||
runStatus === 'queued' ||
runStatus === 'waiting' ||
runStatus === 'pending'
) {
Steps to Reproduce
- Use
wait-for-completion: true
- Dispatch a workflow that uses a concurrency group or is otherwise queued before a runner is assigned
- Observe the warning and
conclusion: null
Environment
- Action version:
v1.3.2 (31e2b3319)
Description
When a dispatched workflow run enters the
pendingstate (e.g. due to a concurrency group or unavailable runner), the polling loop exits immediately and reports a false warning instead of continuing to wait.Root Cause
In
src/main.ts, the while loop only checks for three statuses:pendingis a valid GitHub Actions run status but is not included. When the API returnspending, the loop exits and falls into theelsebranch:This produces the misleading message:
Expected Behavior
The polling loop should continue waiting when the status is
pending, just like it does forqueuedorwaiting.Suggested Fix
Steps to Reproduce
wait-for-completion: trueconclusion: nullEnvironment
v1.3.2(31e2b3319)