Skip to content

Commit

Permalink
Merge pull request #972 from getsentry/replace-bot-account-with-githu…
Browse files Browse the repository at this point in the history
…b-app

feat(security): Replace bot account with GitHub App
  • Loading branch information
Jeffreyhung authored Dec 11, 2024
2 parents a5e4f1f + 57cbd2e commit 8d99f60
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ jobs:
if: github.actor == 'getsentry-bot' && startsWith(github.head_ref, 'craft-')
runs-on: ubuntu-latest
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- run: |
set -x
GH_TOKEN=$GHA_TOKEN gh pr review --approve --repo "$GITHUB_REPOSITORY" "$PR"
GH_TOKEN=$BOT_TOKEN gh pr merge --auto --merge --repo "$GITHUB_REPOSITORY" "$PR"
env:
PR: ${{ github.event.number }}
GHA_TOKEN: ${{ github.token }}
BOT_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
BOT_TOKEN: ${{ steps.token.outputs.token }}

0 comments on commit 8d99f60

Please sign in to comment.