@@ -119,24 +119,29 @@ jobs:
119119 runs-on : ubuntu-latest
120120
121121 steps :
122- - name : Wait for build workflow
122+ - name : Wait for build workflow (INFINITE - NO TIMEOUT)
123123 uses : actions/github-script@v7
124124 with :
125125 script : |
126126 const run_id = '${{ needs.ensure-tests-running.outputs.run_id }}';
127- const maxAttempts = 120; // 1 hour
128- const intervalMs = 30000;
127+ const intervalMs = 30000; // Check every 30 seconds
129128
130- console.log(`Monitoring build run ID: ${run_id}`);
129+ console.log(`🔍 Monitoring build run ID: ${run_id}`);
130+ console.log(`⏰ Will wait INDEFINITELY until build completes (no timeout)`);
131131
132- for (let i = 0; i < maxAttempts; i++) {
132+ let iteration = 0;
133+
134+ while (true) {
135+ iteration++;
136+
133137 const run = await github.rest.actions.getWorkflowRun({
134138 owner: context.repo.owner,
135139 repo: context.repo.repo,
136140 run_id: run_id
137141 });
138142
139- console.log(`Status: ${run.data.status} | Conclusion: ${run.data.conclusion || 'N/A'}`);
143+ const elapsed = Math.floor((iteration * intervalMs) / 60000);
144+ console.log(`[${elapsed}m] Status: ${run.data.status} | Conclusion: ${run.data.conclusion || 'N/A'}`);
140145
141146 if (run.data.status === 'completed') {
142147 if (run.data.conclusion === 'success') {
@@ -147,10 +152,15 @@ jobs:
147152 }
148153 }
149154
155+ // Still running - keep waiting
156+ if (run.data.status === 'queued') {
157+ console.log(' ⏳ Build is queued, waiting for runner...');
158+ } else if (run.data.status === 'in_progress') {
159+ console.log(' 🏃 Build is running...');
160+ }
161+
150162 await new Promise(resolve => setTimeout(resolve, intervalMs));
151163 }
152-
153- throw new Error('❌ Timeout waiting for build');
154164
155165 deploy :
156166 needs : wait-for-tests
0 commit comments