Skip to content

Commit 311a7bd

Browse files
committed
Adjust permissions of update-doc-db job
1 parent 8c01615 commit 311a7bd

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/update-doc-db.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Update doc DB
22

3-
permissions:
4-
contents: write
5-
pull-requests: write
3+
permissions: {}
64

75
on:
86
workflow_dispatch:
@@ -22,6 +20,8 @@ defaults:
2220

2321
jobs:
2422
generate:
23+
permissions:
24+
contents: read
2525
runs-on: ${{ matrix.os }}
2626
strategy:
2727
matrix:
@@ -54,17 +54,19 @@ jobs:
5454
merge:
5555
runs-on: ubuntu-latest
5656
needs: generate
57+
permissions:
58+
contents: write
59+
pull-requests: write
5760
steps:
5861
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5962
with:
6063
persist-credentials: true
6164
ref: ${{ inputs.base-ref }}
62-
token: ${{ secrets.AUTO_COMMIT_PAT }}
6365

6466
- name: Create update branch
67+
run: git switch -c "update-doc-${PYTHON_VERSION}"
6568
env:
6669
PYTHON_VERSION: ${{ inputs.python-version }}
67-
run: git switch -c "update-doc-${PYTHON_VERSION}"
6870

6971
- name: Download generated doc DBs
7072
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
@@ -107,7 +109,7 @@ jobs:
107109

108110
- name: Commit, push and create PR
109111
env:
110-
GH_TOKEN: ${{ secrets.AUTO_COMMIT_PAT }}
112+
GH_TOKEN: ${{ github.token }}
111113
PYTHON_VERSION: ${{ inputs.python-version }}
112114
BASE_REF: ${{ inputs.base-ref }}
113115
run: |

0 commit comments

Comments
 (0)