Generate SDK #494
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: Generate SDK | |
| permissions: | |
| checks: write | |
| contents: write | |
| pull-requests: write | |
| statuses: write | |
| id-token: write | |
| "on": | |
| repository_dispatch: | |
| types: openapi_published | |
| 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 * * * | |
| 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 }} | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} | |
| notify: | |
| needs: generate | |
| runs-on: ubuntu-latest | |
| if: ${{ contains(needs.*.result, 'failure') }} | |
| steps: | |
| - name: Slack Notification | |
| uses: rtCamp/action-slack-notify@v2 | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| SLACK_USERNAME: Python SDK | |
| SLACK_TITLE: Python SDK | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_SDK_WEBHOOK_URL }} | |
| SLACK_CHANNEL: sdk-updates | |
| SLACK_MSG_AUTHOR: gr4vy-code | |
| SLACK_ICON_EMOJI: ":gr4vy:" | |
| SLACK_COLOR: "${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}" | |
| SLACK_MESSAGE_ON_SUCCESS: "SDK generation succeeded" | |
| SLACK_MESSAGE_ON_FAILURE: "SDK generation failed" | |
| SLACK_FOOTER: "" |