Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrating SDK to new Speakeasy workflow format #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 22 additions & 27 deletions .github/workflows/speakeasy_sdk_generation.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
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 * * *
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
schedule:
- cron: 0 0 * * *
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
with:
force: ${{ github.event.inputs.force }}
languages: |
- go
mode: pr
openapi_doc_auth_header: Authorization
openapi_docs: |
- https://raw.githubusercontent.com/smartcar/api-schema/master/speakeasy/openapi.yaml
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
openapi_doc_auth_token: ${{ secrets.OPENAPI_DOC_AUTH_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
with:
force: ${{ github.event.inputs.force }}
mode: pr
speakeasy_version: latest
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
openapi_doc_auth_token: ${{ secrets.OPENAPI_DOC_AUTH_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
11 changes: 11 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
workflowVersion: 1.0.0
sources:
my-source:
inputs:
- location: https://raw.githubusercontent.com/smartcar/api-schema/master/speakeasy/openapi.yaml
authHeader: Authorization
authSecret: $openapi_doc_auth_token
targets:
smartcar-go-v2:
target: go
source: my-source