Skip to content

Commit

Permalink
add auto merge workflow for bots
Browse files Browse the repository at this point in the history
  • Loading branch information
andreykaipov committed Dec 19, 2023
1 parent c8eb2ee commit 9d12cae
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto-merge bot PRs

on:
workflow_dispatch:
pull_request:

permissions:
pull-requests: write
contents: write

jobs:
automerge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' || github.actor == 'cathy-cloud[bot]'
steps:
- uses: actions/checkout@v4

- uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.CATHY_CLOUD_APP_ID }}
private_key: ${{ secrets.CATHY_CLOUD_APP_PRIVATE_KEY }}

- name: automerge bot PRs
run: |
gh pr merge --squash --auto ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}

0 comments on commit 9d12cae

Please sign in to comment.