Skip to content

Generate

Generate #144

name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
compute_tags:
runs-on: ubuntu-latest
outputs:
build_tag: ${{ steps.compute_tags.outputs.build_tag }}
steps:
- name: Check build tag
id: compute_tags
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "::set-output name=build_tag::prod"
else
echo "::set-output name=build_tag::"
fi
generate:
needs: compute_tags
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: direct
speakeasy_version: latest
registry_tags: |-
ryan
docs-source: release_candidate_${{ github.sha }}
${{ needs.compute_tags.outputs.build_tag }}
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
openapi_doc_auth_token: ${{ secrets.OPENAPI_DOC_AUTH_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}