Skip to content

Commit 8d99f60

Browse files
authored
Merge pull request #972 from getsentry/replace-bot-account-with-github-app
feat(security): Replace bot account with GitHub App
2 parents a5e4f1f + 57cbd2e commit 8d99f60

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/auto-merge.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ jobs:
77
if: github.actor == 'getsentry-bot' && startsWith(github.head_ref, 'craft-')
88
runs-on: ubuntu-latest
99
steps:
10+
- name: Get auth token
11+
id: token
12+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
13+
with:
14+
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
15+
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
1016
- run: |
1117
set -x
1218
GH_TOKEN=$GHA_TOKEN gh pr review --approve --repo "$GITHUB_REPOSITORY" "$PR"
1319
GH_TOKEN=$BOT_TOKEN gh pr merge --auto --merge --repo "$GITHUB_REPOSITORY" "$PR"
1420
env:
1521
PR: ${{ github.event.number }}
1622
GHA_TOKEN: ${{ github.token }}
17-
BOT_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
23+
BOT_TOKEN: ${{ steps.token.outputs.token }}

0 commit comments

Comments
 (0)