-
-
Notifications
You must be signed in to change notification settings - Fork 5
23 lines (22 loc) · 801 Bytes
/
auto-merge.yml
File metadata and controls
23 lines (22 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: auto merge
on:
pull_request_target:
jobs:
auto-merge:
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@3378cda945da322a8db4b193e19d46352ebe2de5 #v.1.10.4
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: ${{ steps.token.outputs.token }}