Skip to content

Commit 3fd66c0

Browse files
committed
separate out speakeasy workflow into a local action
1 parent aea0992 commit 3fd66c0

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Invoke Speakeasy resusable workflow
2+
on:
3+
workflow_call:
4+
inputs:
5+
force:
6+
description: Force generation of SDKs
7+
type: boolean
8+
default: false
9+
set_version:
10+
description: optionally set a specific SDK version
11+
type: string
12+
target:
13+
description: Generate a specific target by name
14+
required: false
15+
type: string
16+
jobs:
17+
generate:
18+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
19+
with:
20+
force: ${{ inputs.force }}
21+
mode: pr
22+
set_version: ${{ inputs.set_version }}
23+
target: gusto-embedded
24+
secrets:
25+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
26+
npm_token: ${{ secrets.NPM_TOKEN }}
27+
openapi_doc_auth_token: ${{ secrets.OPENAPI_DOC_AUTH_TOKEN }}
28+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.github/workflows/sdk_generation.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,10 @@ jobs:
2121
runs-on:
2222
group: gusto-ubuntu-default
2323
step:
24-
- uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@15
24+
- uses: .github/actions/speakeasy-workflow.yaml
2525
with:
2626
force: ${{ github.event.inputs.force }}
2727
mode: pr
2828
set_version: ${{ github.event.inputs.set_version }}
2929
target: gusto-embedded
30-
secrets:
31-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
32-
npm_token: ${{ secrets.NPM_TOKEN }}
33-
openapi_doc_auth_token: ${{ secrets.OPENAPI_DOC_AUTH_TOKEN }}
34-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
30+
secrets: inherit

0 commit comments

Comments
 (0)