From e7d7ce98e591b0da2be44d8322147cae01708bdc Mon Sep 17 00:00:00 2001 From: Sagar Batchu Date: Wed, 16 Oct 2024 14:06:47 -0700 Subject: [PATCH] chore: speakeasy migrate --- .../workflows/speakeasy_sdk_generation.yml | 49 +++++++++---------- .speakeasy/workflow.yaml | 11 +++++ 2 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 .speakeasy/workflow.yaml diff --git a/.github/workflows/speakeasy_sdk_generation.yml b/.github/workflows/speakeasy_sdk_generation.yml index 8f94992..0cde207 100644 --- a/.github/workflows/speakeasy_sdk_generation.yml +++ b/.github/workflows/speakeasy_sdk_generation.yml @@ -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 }} diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 0000000..aa744f7 --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -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