Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
ci: add automatic SDK generation action
Browse files Browse the repository at this point in the history
This commit adds a automatic Livepeer SDK generation action that gets
triggered when the OpenAPI spec in the
https://github.com/livepeer/ai-worker repository has changed
  • Loading branch information
rickstaa committed Jul 20, 2024
1 parent 106cc77 commit 51ea670
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 37 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/update-sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:

# Add this step to set up Node.js and npm with caching
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16' # Specify your Node.js version here
cache: 'npm'
node-version: '20'

- name: Checkout ai-worker repository
uses: actions/checkout@v4
Expand All @@ -40,19 +39,19 @@ jobs:
run: |
cd ai-worker/runner
python gen_openapi.py --entrypoint gateway
mv openapi_gateway.json $GITHUB_WORKSPACE/ai/api-reference/openapi_ai_gateway.json
mv openapi_gateway.json $GITHUB_WORKSPACE/openapi_ai_gateway.json
cd $GITHUB_WORKSPACE
- name: Generate AI SDKs
run: |
bash scripts/generate_sdks.sh
bash scripts/gen_client_sdks.bash
- name: Commit OpenAPI spec and create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: |
ai/api-reference/openapi_ai_gateway.json
openapi_ai_gateway.json
sdk/*
commit-message: "chore: update AI SDKs"
title: "Automated AI SDKs update"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
18 changes: 0 additions & 18 deletions .vscode/settings.json

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/openapitools.json

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/package-lock.json

This file was deleted.

0 comments on commit 51ea670

Please sign in to comment.