This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (55 loc) · 1.96 KB
/
update-sdks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Update AI SDKs
on:
repository_dispatch:
types: [update-ai-openapi]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-ai-sdks:
runs-on: ubuntu-latest
steps:
- name: Checkout main repository
uses: actions/checkout@v4
# Add this step to set up Node.js and npm with caching
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Checkout ai-worker repository
uses: actions/checkout@v4
with:
repository: "livepeer/ai-worker"
path: "ai-worker"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r ai-worker/runner/requirements.txt
- name: Generate AI OpenAPI specification
working-directory: ai-worker/runner
run: |
python gen_openapi.py --entrypoint gateway
mv openapi_gateway.json $GITHUB_WORKSPACE/openapi_ai_gateway.json
- name: Generate AI SDKs
run: |
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: |
openapi_ai_gateway.json
sdks/*
commit-message: "chore: update AI SDKs"
title: "Automated AI SDKs update"
body: |
This is an automated pull request to update the AI SDKs due to changes in the AI Worker OpenAPI specification (upstream commit [${{github.event.client_payload.sha}}](https://livepeer/ai-worker/commit/${{github.event.client_payload.sha}})).
branch: "update-openapi-spec"
base: "main"
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"