From 65f933a911e65c8765f0038b6b4b209f149ad02b Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Wed, 31 Jul 2024 17:45:18 +0200 Subject: [PATCH] ci: add JS/TS SDK update trigger This commit adds an update trigger to the OpenAPI sync action that triggers an update of the JS/TS SDK. --- .../trigger-upstream-openapi-sync.yaml | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/trigger-upstream-openapi-sync.yaml b/.github/workflows/trigger-upstream-openapi-sync.yaml index 9e006f7d..4b67c97b 100644 --- a/.github/workflows/trigger-upstream-openapi-sync.yaml +++ b/.github/workflows/trigger-upstream-openapi-sync.yaml @@ -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 }}"}'