Skip to content

SDK Generation

SDK Generation #4

name: SDK Generation
on:
workflow_dispatch:
inputs:
force:
description: Force SDK generation even if no changes are detected
required: false
default: "false"
type: string
feature_branch:
description: Branch for SDK changes
required: false
type: string
environment:
description: Environment variables (e.g., TAG=branch-name)
required: false
type: string
schedule:
- cron: "0 6 * * 1"
# Serialize generations: overlapping cron/dispatch runs race on the same
# branch/PR. Queue instead of cancel so a triggered regen is never dropped.
concurrency:
group: sdk-generation
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
checks: write
statuses: write
jobs:
generate:
# Pin to commit SHA for v15 (mutable tags can be retargeted).
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7276a3ae83eafb7fe37630fb1fefea3f2649debd # v15
with:
mode: pr
force: ${{ inputs.force || 'false' }}
feature_branch: ${{ inputs.feature_branch }}
environment: ${{ inputs.environment }}
secrets:
# Prefer a PAT: PRs opened with GITHUB_TOKEN do not trigger
# pull_request workflows, so verify CI would never run on them.
github_access_token: ${{ secrets.SDK_BOT_PAT || secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}