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 8e59a91
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Auto-merge bot PRs

on:
workflow_dispatch:
pull_request:
branches: [main]

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 8e59a91

Please sign in to comment.