Update OpenAPI #24007
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: Update OpenAPI | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '25 * * * *' | |
| jobs: | |
| openapi-gen: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| package: [[vercel-api-js], [netlify-api], [zoom-api-js], [keycloak-api], [cloudflare-api-js], [nuki-api-js]] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Read .nvmrc | |
| run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
| id: nvm | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js ${{ steps.nvm.outputs.NVMRC }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NVMRC }} | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build OpenAPI spec from PR | |
| run: pnpm generate --filter=${{ matrix.package[0] }} | |
| - run: npx tsx ./.github/workflows/scripts/changes.ts ${{ matrix.package[0] }} | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| - run: git add . | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GIT_TOKEN }} | |
| commit-message: 'Update OpenAPI Spec' | |
| committer: 'SferaDev <SferaDev@users.noreply.github.com>' | |
| title: '[OpenAPI] Spec updates for ${{ matrix.package[0] }}' | |
| body: | | |
| This is an autogenerated PR to update the OpenAPI spec with the latest merged changes. | |
| Before merging these changes, please review the update and test it out. | |
| branch: openapi/${{ matrix.package[0] }} |