Skip to content

Commit 91b83be

Browse files
committed
fix(release): scope the tap token to contents write
Without a permission-* input, actions/create-github-app-token mints a token carrying every permission the App installation holds -- here that includes pull-request write, which cloning and pushing the Homebrew tap never uses. Supplying one input switches the action to strict opt-in, so the token now carries contents write and nothing else.
1 parent 5859abd commit 91b83be

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ jobs:
325325
with:
326326
node-version-file: .nvmrc
327327

328+
# Any permission-* input switches the token from inheriting every
329+
# permission the App installation holds to exactly the ones listed here.
330+
# Cloning and pushing the tap needs contents and nothing else.
328331
- name: Mint tap token
329332
id: tap-token
330333
uses: actions/create-github-app-token@v2
@@ -333,6 +336,7 @@ jobs:
333336
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
334337
owner: PyModel
335338
repositories: homebrew-tap
339+
permission-contents: write
336340

337341
- name: Bump formula
338342
env:

0 commit comments

Comments
 (0)