sync-openapi #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sync-openapi | |
| on: | |
| schedule: | |
| - cron: '17 4 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: sync-openapi | |
| cancel-in-progress: true | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - name: Use Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Download schema and regenerate SDK | |
| run: pnpm generate | |
| - name: Verify generated package | |
| run: pnpm lint && pnpm typecheck && pnpm test | |
| - name: Create or update sync pull request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| branch: codex/openapi-sync | |
| delete-branch: true | |
| commit-message: 'feat(api): sync Nodesty OpenAPI schema' | |
| title: 'feat(api): sync Nodesty OpenAPI schema' | |
| body: | | |
| Automated SDK regeneration from https://nodesty.com/_openapi.json. | |
| Review the generated request and response type changes before merging. |