Skip to content

Generate

Generate #53

name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
id-token: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
schedule:
- cron: 0 0 * * *
pull_request:
types:
- labeled
- unlabeled
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: pr
set_version: ${{ github.event.inputs.set_version }}
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.SDK_NPM_AUTH_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
post-generation-fixes:
name: Post-Generation Fixes
runs-on: ubuntu-latest
needs: generate
if: needs.generate.outputs.branch_name != ''
permissions:
contents: write
env:
BRANCH_NAME: ${{ needs.generate.outputs.branch_name }}
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Fix manifest.json
uses: ./.github/actions/fix-manifest
with:
branch_name: ${{ env.BRANCH_NAME }}
github_token: ${{ secrets.GITHUB_TOKEN }}