Skip to content

Commit

Permalink
Merge pull request #85 from wayofdev/feat/auto-approve-action
Browse files Browse the repository at this point in the history
ci: auto merge renovate bot prs
  • Loading branch information
lotyp authored Sep 5, 2024
2 parents 31ffab6 + d0316ca commit 4e4b761
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---

on: # yamllint disable-line rule:truthy
workflow_run:
types:
- completed
workflows:
- '🔍 Continuous integration'

name: 📥 Merge pull requests

jobs:
merge:
runs-on: ubuntu-latest
timeout-minutes: 5
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.actor == 'renovate' && (
startsWith(github.event.workflow_run.head_commit.message, 'chore(deps)')
)
steps:
- name: 🙋‍♂️ Request reviewer from @way-finder-bot
uses: wayofdev/gh-actions/actions/github/pull-request/[email protected]
with:
reviewer: 'way-finder-bot'
github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}"

- name: 🙋‍♂️ Assign @way-finder-bot
uses: wayofdev/gh-actions/actions/github/pull-request/[email protected]
with:
assignee: 'way-finder-bot'
github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}"

- name: ✅ Approve pull request
uses: wayofdev/gh-actions/actions/github/pull-request/[email protected]
with:
github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}"

- name: 📥 Merge pull request
uses: wayofdev/gh-actions/actions/github/pull-request/[email protected]
with:
github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}"
4 changes: 2 additions & 2 deletions actions/github/pull-request/request-review/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ runs:
core.setFailed(`Unable to determine the pull request number for event "${context.eventName}"`);
- name: "Request reviewer"
uses: "actions/[email protected]"
- name: 🙋‍♂️ Request reviewer
uses: actions/[email protected]
env:
REVIEWER: "${{ inputs.reviewer }}"
with:
Expand Down

0 comments on commit 4e4b761

Please sign in to comment.