Skip to content

Commit c27cf4d

Browse files
committed
all or nothing
1 parent 5829867 commit c27cf4d

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

.github/workflows/update-provider-types.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,28 @@ jobs:
156156
157157
Leave code changes in the working tree only. The workflow will run formatting, build validation, and PR creation after this step.
158158
159+
- name: Re-run provider update after repair
160+
if: steps.generate.outcome == 'failure'
161+
run: |
162+
set -euo pipefail
163+
log_path="$RUNNER_TEMP/provider-type-generation.retry.log"
164+
: > "$log_path"
165+
166+
providers="${{ steps.providers.outputs.providers }}"
167+
IFS=',' read -ra provider_array <<< "$providers"
168+
for provider in "${provider_array[@]}"; do
169+
provider=$(echo "$provider" | xargs)
170+
if [ -z "$provider" ]; then
171+
continue
172+
fi
173+
174+
{
175+
echo
176+
echo "## Updating $provider"
177+
./pipelines/generate-provider-types.sh "$provider"
178+
} 2>&1 | tee -a "$log_path"
179+
done
180+
159181
- name: Check for changes
160182
id: changes
161183
run: |
@@ -170,12 +192,6 @@ jobs:
170192
echo "Changes detected:"
171193
git status --short
172194
173-
- name: Fail if generation could not be repaired
174-
if: steps.generate.outcome == 'failure' && steps.changes.outputs.has_changes != 'true'
175-
run: |
176-
echo "Provider type generation failed and the repair step left no changes to validate."
177-
exit 1
178-
179195
- name: Format code
180196
if: steps.changes.outputs.has_changes == 'true'
181197
run: cargo fmt --all
@@ -204,6 +220,7 @@ jobs:
204220
echo "- Ran \`./pipelines/generate-provider-types.sh\` for each requested provider"
205221
if [ "${{ steps.generate.outcome }}" = "failure" ]; then
206222
echo "- Ran one Claude repair pass after the initial generation/build failure"
223+
echo "- Re-ran \`./pipelines/generate-provider-types.sh\` for each requested provider after repair"
207224
fi
208225
echo "- Ran \`cargo fmt --all\`"
209226
echo "- Ran \`cargo build --all-features\`"

0 commit comments

Comments
 (0)