68
68
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
69
69
echo "Using GitHub context URL: $REPO_URL"
70
70
fi
71
- echo "repo_url=$REPO_URL" >> $GITHUB_OUTPUT - name: Create documentation job
72
- id : create-job
71
+ echo "repo_url=$REPO_URL" >> $GITHUB_OUTPUT
72
+
73
+ - name : Create and poll documentation job
74
+ id : fetch-docs
73
75
shell : bash
74
76
run : |
75
77
CREATE_JOB_URL="https://server.codeboarding.org/github_action/jobs"
@@ -171,28 +173,13 @@ runs:
171
173
echo "✅ Job created successfully!"
172
174
echo "🆔 Job ID: $JOB_ID"
173
175
174
- # Clean up temporary file
175
- rm -f "$TEMP_FILE"
176
-
177
- # Set output
178
- echo "job_id=$JOB_ID" >> $GITHUB_OUTPUT
179
-
180
- - name : Poll job status and fetch results
181
- id : fetch-docs
182
- timeout-minutes : 90
183
- shell : bash
184
- run : |
185
- JOB_ID="${{ steps.create-job.outputs.job_id }}"
176
+ # Start polling job status
186
177
STATUS_URL="https://server.codeboarding.org/github_action/jobs/$JOB_ID"
187
178
188
- echo "� Starting job status polling..."
189
- echo "🆔 Job ID: $JOB_ID"
179
+ echo "📊 Starting job status polling..."
190
180
echo "⏰ This may take 15-45 minutes for large repositories..."
191
181
echo "💡 If your workflow times out, increase 'timeout-minutes' in your job configuration"
192
182
193
- # Create temporary file for response
194
- TEMP_FILE=$(mktemp)
195
-
196
183
# Polling loop
197
184
POLL_COUNT=0
198
185
MAX_POLLS=90 # 90 minutes max (90 * 1 minute intervals)
@@ -207,8 +194,9 @@ runs:
207
194
--max-time 30 \
208
195
--connect-timeout 10 \
209
196
"$STATUS_URL")
210
- curl_exit_code=$?
211
197
198
+ # Handle polling response
199
+ curl_exit_code=$?
212
200
http_code=${response: -3}
213
201
214
202
# Handle curl errors
@@ -255,7 +243,7 @@ runs:
255
243
mv "${TEMP_FILE}_result" "$TEMP_FILE"
256
244
257
245
echo "response_file=$TEMP_FILE" >> $GITHUB_OUTPUT
258
- exit 0
246
+ break
259
247
else
260
248
echo "❌ Error: Job completed but no result field found"
261
249
echo "📄 Response content:"
0 commit comments