diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..8529e00 --- /dev/null +++ b/.github/workflows/merge.yml @@ -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/request-review@v3.2.0 + 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/add-assignee@v3.2.0 + with: + assignee: 'way-finder-bot' + github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}" + + - name: ✅ Approve pull request + uses: wayofdev/gh-actions/actions/github/pull-request/approve@v3.2.0 + with: + github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}" + + - name: 📥 Merge pull request + uses: wayofdev/gh-actions/actions/github/pull-request/merge@v3.2.0 + with: + github-token: "${{ secrets.WAY_FINDER_BOT_TOKEN }}" diff --git a/actions/github/pull-request/request-review/action.yml b/actions/github/pull-request/request-review/action.yml index b6a2de2..9ed2a67 100644 --- a/actions/github/pull-request/request-review/action.yml +++ b/actions/github/pull-request/request-review/action.yml @@ -45,8 +45,8 @@ runs: core.setFailed(`Unable to determine the pull request number for event "${context.eventName}"`); - - name: "Request reviewer" - uses: "actions/github-script@v7.0.1" + - name: 🙋‍♂️ Request reviewer + uses: actions/github-script@v7.0.1 env: REVIEWER: "${{ inputs.reviewer }}" with: