Skip to content

Commit b41c028

Browse files
committed
Updates
1 parent 0711003 commit b41c028

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

action.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ runs:
6868
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
6969
echo "Using GitHub context URL: $REPO_URL"
7070
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
7375
shell: bash
7476
run: |
7577
CREATE_JOB_URL="https://server.codeboarding.org/github_action/jobs"
@@ -171,28 +173,13 @@ runs:
171173
echo "✅ Job created successfully!"
172174
echo "🆔 Job ID: $JOB_ID"
173175
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
186177
STATUS_URL="https://server.codeboarding.org/github_action/jobs/$JOB_ID"
187178
188-
echo "� Starting job status polling..."
189-
echo "🆔 Job ID: $JOB_ID"
179+
echo "📊 Starting job status polling..."
190180
echo "⏰ This may take 15-45 minutes for large repositories..."
191181
echo "💡 If your workflow times out, increase 'timeout-minutes' in your job configuration"
192182
193-
# Create temporary file for response
194-
TEMP_FILE=$(mktemp)
195-
196183
# Polling loop
197184
POLL_COUNT=0
198185
MAX_POLLS=90 # 90 minutes max (90 * 1 minute intervals)
@@ -207,8 +194,9 @@ runs:
207194
--max-time 30 \
208195
--connect-timeout 10 \
209196
"$STATUS_URL")
210-
curl_exit_code=$?
211197
198+
# Handle polling response
199+
curl_exit_code=$?
212200
http_code=${response: -3}
213201
214202
# Handle curl errors
@@ -255,7 +243,7 @@ runs:
255243
mv "${TEMP_FILE}_result" "$TEMP_FILE"
256244
257245
echo "response_file=$TEMP_FILE" >> $GITHUB_OUTPUT
258-
exit 0
246+
break
259247
else
260248
echo "❌ Error: Job completed but no result field found"
261249
echo "📄 Response content:"

0 commit comments

Comments
 (0)