Update token usage

- Move to `GITHUB_TOKEN` where possible
- Move from `HOMEBREW_GITHUB_API_TOKEN` to
  `HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN`
master
Mike McQuaid 2021-04-06 13:40:44 +01:00
parent f658174f11
commit 760281826c
7 changed files with 19 additions and 19 deletions

View File

@ -20,5 +20,5 @@ jobs:
- name: Run automerge
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
run: brew pr-automerge --verbose --publish --autosquash

View File

@ -102,7 +102,7 @@ jobs:
if: ${{!success() && github.event.inputs.issue > 0}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.issue}}
body: ":x: @${{github.actor}} bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":x: Bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
@ -162,7 +162,7 @@ jobs:
- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
env:
GIT_COMMITTER_NAME: BrewTestBot
GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com
@ -172,7 +172,7 @@ jobs:
if: ${{!success() && github.event.inputs.issue > 0}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.issue}}
body: ":x: @${{github.actor}} bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":x: Bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."

View File

@ -103,7 +103,7 @@ jobs:
if: ${{!success() && github.event.inputs.issue > 0}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.issue}}
body: ":x: @${{github.actor}} bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":x: Bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
@ -163,7 +163,7 @@ jobs:
- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
env:
GIT_COMMITTER_NAME: BrewTestBot
GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com
@ -173,7 +173,7 @@ jobs:
if: ${{!success() && github.event.inputs.issue > 0}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.GITHUB_TOKEN}}
issue: ${{github.event.inputs.issue}}
body: ":x: @${{github.actor}} bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":x: Bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."

View File

@ -86,7 +86,7 @@ jobs:
if: ${{!success() && github.event.inputs.issue > 0}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.issue}}
body: ":x: @${{github.actor}} bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":x: Bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
@ -137,7 +137,7 @@ jobs:
- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
env:
GIT_COMMITTER_NAME: BrewTestBot
GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com
@ -147,7 +147,7 @@ jobs:
if: ${{!success() && github.event.inputs.issue > 0}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.issue}}
body: ":x: @${{github.actor}} bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":x: Bottle request for ${{github.event.inputs.formula}} [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."

View File

@ -20,7 +20,7 @@ jobs:
- name: Post comment once started
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.pull_request}}
body: ":shipit: @${{github.actor}} has [triggered a merge](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":robot: A scheduled task has [triggered a merge](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
@ -64,7 +64,7 @@ jobs:
- name: Pull bottles
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}}
HOMEBREW_GPG_PASSPHRASE: ${{ secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
HOMEBREW_BINTRAY_USER: brewtestbot
HOMEBREW_BINTRAY_KEY: ${{secrets.HOMEBREW_BINTRAY_KEY}}
@ -81,7 +81,7 @@ jobs:
- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.GITHUB_TOKEN}}
env:
GIT_COMMITTER_NAME: BrewTestBot
GIT_COMMITTER_EMAIL: 1589480+BrewTestBot@users.noreply.github.com
@ -91,7 +91,7 @@ jobs:
if: ${{!success()}}
uses: Homebrew/actions/post-comment@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
issue: ${{github.event.inputs.pull_request}}
body: ":warning: @${{github.actor}} bottle publish [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
bot_body: ":warning: Bottle publish [failed](${{github.event.repository.html_url}}/actions/runs/${{github.run_id}})."
@ -101,7 +101,7 @@ jobs:
if: ${{!success()}}
uses: Homebrew/actions/dismiss-approvals@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
pr: ${{github.event.inputs.pull_request}}
message: "bottle publish failed"

View File

@ -37,7 +37,7 @@ jobs:
if: ${{ steps.remove_disabled.outputs.formulae-removed == 'true' }}
uses: peter-evans/create-pull-request@45c510e1f68ba052e3cd911f661a799cfb9ba3a3
with:
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
branch: remove-disabled-formulae
title: Remove disabled formulae
body: >

View File

@ -9,17 +9,17 @@ jobs:
- name: Check commit format
uses: Homebrew/actions/check-commit-format@master
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
- name: Cancel previous runs
uses: Homebrew/actions/cancel-previous-runs@master
if: always()
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
- name: Label pull request
uses: Homebrew/actions/label-pull-requests@master
if: always()
with:
token: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
token: ${{secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN}}
def: |
[
{