Skip to content

Update SDK code samples #15

Update SDK code samples

Update SDK code samples #15

Workflow file for this run

name: Update SDK code samples
on:
workflow_dispatch:
inputs:
schema_url:
description: 'URL of the base OpenAPI schema'
required: true
default: 'https://api.polar.sh/openapi.json'
languages:
description: 'Comma-separated list of languages to generate code samples for'
required: true
default: 'python,js'
concurrency:
group: update-sdk-code-samples
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/sdk
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Speakeasy CLI
run: |
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
- name: Download and apply code samples overlay to OpenAPI schema
run: ./code_samples.sh ${{ github.event.inputs.schema_url }} ${{ github.event.inputs.languages }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
add-paths: sdk/schema.json
commit-message: 'docs: update SDK code samples [vercel build]'
title: 'docs: update SDK code samples'
branch: update-sdk-code-samples
delete-branch: true