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

Commit

Permalink
ci: add pull request permissions to SDK action
Browse files Browse the repository at this point in the history
This commit ensure that the SDK generation action has enough
permissions.
  • Loading branch information
rickstaa committed Jul 23, 2024
1 parent dd4b878 commit b34209d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/update-sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types: [update-ai-openapi]
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-ai-sdks:
runs-on: ubuntu-latest
Expand All @@ -16,7 +20,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Checkout ai-worker repository
uses: actions/checkout@v4
Expand All @@ -36,11 +40,10 @@ jobs:
pip install -r ai-worker/runner/requirements.txt
- name: Generate AI OpenAPI specification
working-directory: runner
run: |
cd ai-worker/runner
python gen_openapi.py --entrypoint gateway
mv openapi_gateway.json $GITHUB_WORKSPACE/openapi_ai_gateway.json
cd $GITHUB_WORKSPACE
- name: Generate AI SDKs
run: |
Expand All @@ -56,9 +59,7 @@ jobs:
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 }})).
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 <actions@github.com>"
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"

0 comments on commit b34209d

Please sign in to comment.