@@ -20,31 +20,28 @@ jobs:
2020 ref : ${{ github.event.pull_request.head.ref }}
2121 token : ${{ secrets.GITHUB_TOKEN }}
2222
23- - name : Setup Speakeasy
24- uses : speakeasy-api/sdk-generation-action@v15
25- with :
26- github_access_token : ${{ secrets.GITHUB_TOKEN }}
27- speakeasy_api_key : ${{ secrets.SPEAKEASY_API_KEY }}
28- speakeasy_version : latest
23+ - name : Install Speakeasy CLI
24+ run : |
25+ curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
26+ # Verify speakeasy command is available
27+ if ! command -v speakeasy &> /dev/null; then
28+ echo "Error: speakeasy command not found after installation"
29+ exit 1
30+ fi
31+ speakeasy --version
2932
3033 - name : Run Speakeasy
3134 run : speakeasy run
35+ env :
36+ SPEAKEASY_API_KEY : ${{ secrets.SPEAKEASY_API_KEY }}
3237
3338 - name : Validate SDK
3439 uses : ./.github/actions/validate-sdk
3540 with :
3641 openrouter-api-key : ${{ secrets.OPENROUTER_API_KEY }}
3742
38- - name : Commit changes
39- run : |
40- git config --global user.name 'github-actions[bot]'
41- git config --global user.email 'github-actions[bot]@users.noreply.github.com'
42- git add .
43- if git diff --staged --quiet; then
44- echo "No changes to commit"
45- else
46- git commit -m "chore: run speakeasy and update generated files"
47- git push
48- fi
49- env :
50- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ - name : Auto-commit generated SDK and API docs
44+ uses : int128/update-generated-files-action@v2
45+ with :
46+ # Set a custom message to the new commit (optional)
47+ commit-message : ' Chore: auto-generate SDK and API documentation'
0 commit comments