Skip to content

Commit

Permalink
ci: add JS/TS SDK update trigger
Browse files Browse the repository at this point in the history
This commit adds an update trigger to the OpenAPI sync action that
triggers an update of the JS/TS SDK.
  • Loading branch information
rickstaa committed Jul 31, 2024
1 parent 8da8ed0 commit 65f933a
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/trigger-upstream-openapi-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,40 @@ on:
workflow_dispatch:

jobs:
trigger-upstream-openapi-sync:
trigger-sdks-openapi-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Trigger docs AI OpenAPI spec update
- name: Trigger experimental SDKs update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DOCS_TRIGGER_PAT }}
repository: livepeer/docs
token: ${{ secrets.SDKS_TRIGGER_PAT }}
repository: livepeer/livepeer-ai-sdks
event-type: update-ai-openapi
client-payload: '{"sha": "${{ github.sha }}"}'

- name: Trigger SDK generation

- name: Trigger released JS/TS SDK update
# if: startsWith(github.ref, 'refs/tags/') # Only run on release.
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.SDKS_TRIGGER_PAT }}
repository: livepeer/livepeer-ai-sdks
repository: livepeer/ai-sdk-js
event-type: update-ai-openapi
client-payload: '{"sha": "${{ github.sha }}"}'

trigger-docs-openapi-sync:
runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/') # Only run on release.
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Trigger docs AI OpenAPI spec update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DOCS_TRIGGER_PAT }}
repository: rickstaa/docs
event-type: update-ai-openapi
client-payload: '{"sha": "${{ github.sha }}"}'

0 comments on commit 65f933a

Please sign in to comment.