Skip to content

Commit 33a5c73

Browse files
mikipaletclaude
andcommitted
ci: harden OpenAPI fetch + push against transient failures
- Add curl retry (5 attempts, 2s delay, 60s timeout) so a transient SSL error on zernio.com/openapi.yaml no longer fails the run. - Wrap `git push` in a pull-rebase-retry loop (3 attempts) so concurrent dispatches that land back-to-back don't race for the same ref. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 38eaffa commit 33a5c73

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/generate.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
- name: Fetch latest OpenAPI spec
3838
run: |
39-
curl -f -o openapi.yaml https://zernio.com/openapi.yaml
39+
curl -f --retry 5 --retry-delay 2 --retry-all-errors --max-time 60 -o openapi.yaml https://zernio.com/openapi.yaml
4040
echo "Fetched OpenAPI spec"
4141
4242
- name: Generate SDK
@@ -153,7 +153,14 @@ jobs:
153153
154154
- Auto-generated SDK updates
155155
- Version: ${{ steps.version.outputs.new_version }}"
156-
git push
156+
# Retry with rebase to survive concurrent dispatches that land
157+
# back-to-back pushes to main.
158+
for attempt in 1 2 3; do
159+
if git push; then break; fi
160+
echo "Push attempt $attempt failed; rebasing and retrying..."
161+
git pull --rebase origin main
162+
sleep $((attempt * 5))
163+
done
157164
158165
- name: Create GitHub Release
159166
if: steps.changes.outputs.has_changes == 'true'

0 commit comments

Comments
 (0)