GeezerVison is showing github.com — Adjust permissions of `update-doc-db` job · RustPython/RustPython@2f32112
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/update-doc-db.yml +8-6Lines changed: 8 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | name: Update doc DB |
2 | 2 |
|
3 | | -permissions: |
4 | | - contents: write |
5 | | - pull-requests: write |
| 3 | +permissions: {} |
6 | 4 |
|
7 | 5 | on: |
8 | 6 | workflow_dispatch: |
@@ -22,6 +20,8 @@ defaults: |
22 | 20 |
|
23 | 21 | jobs: |
24 | 22 | generate: |
| 23 | + permissions: |
| 24 | + contents: read |
25 | 25 | runs-on: ${{ matrix.os }} |
26 | 26 | strategy: |
27 | 27 | matrix: |
@@ -54,17 +54,19 @@ jobs: |
54 | 54 | merge: |
55 | 55 | runs-on: ubuntu-latest |
56 | 56 | needs: generate |
| 57 | + permissions: |
| 58 | + contents: read |
| 59 | + pull-requests: write |
57 | 60 | steps: |
58 | 61 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
59 | 62 | with: |
60 | 63 | persist-credentials: true |
61 | 64 | ref: ${{ inputs.base-ref }} |
62 | | - token: ${{ secrets.AUTO_COMMIT_PAT }} |
63 | 65 |
|
64 | 66 | - name: Create update branch |
| 67 | + run: git switch -c "update-doc-${PYTHON_VERSION}" |
65 | 68 | env: |
66 | 69 | PYTHON_VERSION: ${{ inputs.python-version }} |
67 | | - run: git switch -c "update-doc-${PYTHON_VERSION}" |
68 | 70 |
|
69 | 71 | - name: Download generated doc DBs |
70 | 72 | uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
@@ -107,7 +109,7 @@ jobs: |
107 | 109 |
|
108 | 110 | - name: Commit, push and create PR |
109 | 111 | env: |
110 | | - GH_TOKEN: ${{ secrets.AUTO_COMMIT_PAT }} |
| 112 | + GH_TOKEN: ${{ github.token }} |
111 | 113 | PYTHON_VERSION: ${{ inputs.python-version }} |
112 | 114 | BASE_REF: ${{ inputs.base-ref }} |
113 | 115 | run: | |
|