Skip to content

Commit 9dac315

Browse files
vdusekclaude
andcommitted
ci: trigger Python client model regeneration on OpenAPI spec changes
Add a job to openapi-ci.yaml that detects OpenAPI file changes in PRs using dorny/paths-filter and triggers the regenerate_models workflow in apify-client-python via gh workflow run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f8dc2d3 commit 9dac315

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/openapi-ci.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,30 @@ jobs:
120120
exit 1
121121
fi
122122
echo "✓ Bundles have valid sizes"
123+
124+
trigger-client-model-regeneration:
125+
name: Trigger Python client model regeneration
126+
runs-on: ubuntu-latest
127+
needs: [validate]
128+
if: github.event_name == 'pull_request'
129+
130+
steps:
131+
- uses: actions/checkout@v6
132+
133+
- name: Check if OpenAPI files changed
134+
uses: dorny/paths-filter@v3
135+
id: filter
136+
with:
137+
filters: |
138+
openapi:
139+
- 'apify-api/openapi/**'
140+
141+
- name: Trigger apify-client-python model regeneration
142+
if: steps.filter.outputs.openapi == 'true'
143+
run: |
144+
gh workflow run regenerate_models.yaml \
145+
--repo apify/apify-client-python \
146+
--field docs_pr_number=${{ github.event.pull_request.number }} \
147+
--field docs_pr_branch=${{ github.head_ref }}
148+
env:
149+
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)