Update OpenAPI spec (2026-03-23) #1
Workflow file for this run
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: Validate SDKs | |
| on: | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: sdk-validation-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| spec-changed: ${{ steps.filter.outputs.spec }} | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| spec: | |
| - 'spec/**' | |
| - name: Load SDK matrix | |
| id: set-matrix | |
| run: echo "matrix=$(jq -c . .github/sdk-matrix.json)" >> "$GITHUB_OUTPUT" | |
| sdk_build: | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.spec-changed == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson(needs.detect-changes.outputs.matrix) }} | |
| steps: | |
| - name: Generate GitHub App token | |
| id: app-token | |
| uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2 | |
| with: | |
| app-id: ${{ secrets.SDK_BOT_APP_ID }} | |
| private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }} | |
| - name: Checkout openapi-spec | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| path: openapi-spec | |
| - name: Checkout oagen-emitters | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| repository: workos/oagen-emitters | |
| token: ${{ steps.app-token.outputs.token }} | |
| path: oagen-emitters | |
| - name: Checkout live SDK | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| repository: ${{ matrix.sdk_repo }} | |
| token: ${{ steps.app-token.outputs.token }} | |
| path: ${{ matrix.sdk_checkout_path }} | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| cache-dependency-path: oagen-emitters/package-lock.json | |
| - name: Install dependencies | |
| working-directory: oagen-emitters | |
| run: npm ci | |
| - name: Extract baseline | |
| working-directory: oagen-emitters | |
| run: npm run sdk:extract:${{ matrix.language }} | |
| - name: Generate | |
| working-directory: oagen-emitters | |
| run: npm run sdk:generate:${{ matrix.language }} | |
| - name: Verify | |
| working-directory: oagen-emitters | |
| run: npm run sdk:verify:${{ matrix.language }} | |
| - name: Upload diagnostics | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: oagen-diagnostics-${{ matrix.language }} | |
| path: | | |
| oagen-emitters/sdk/ | |
| oagen-emitters/sdk-*-surface.json | |
| oagen-emitters/smoke-*.json | |
| retention-days: 14 | |
| sdk-validation: | |
| runs-on: ubuntu-latest | |
| needs: [detect-changes, sdk_build] | |
| if: always() | |
| steps: | |
| - name: Check result | |
| run: | | |
| if [[ "${{ needs.detect-changes.outputs.spec-changed }}" != "true" ]]; then | |
| echo "No spec changes, skipping SDK validation" | |
| exit 0 | |
| fi | |
| if [[ "${{ needs.sdk_build.result }}" != "success" ]]; then | |
| echo "SDK build failed" | |
| exit 1 | |
| fi |