From b34209dd036ae09694fd01566589a49de1906f5b Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Tue, 23 Jul 2024 09:43:33 +0200 Subject: [PATCH] ci: add pull request permissions to SDK action This commit ensure that the SDK generation action has enough permissions. --- .github/workflows/update-sdks.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-sdks.yaml b/.github/workflows/update-sdks.yaml index 619ef0b..2a44fb8 100644 --- a/.github/workflows/update-sdks.yaml +++ b/.github/workflows/update-sdks.yaml @@ -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 @@ -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 @@ -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: | @@ -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 " + author: "github-actions[bot] "