Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Automerge

Automerge #8207

Workflow file for this run

name: Automerge
on:
workflow_run:
workflows: [CI]
types:
- completed
jobs:
automerge:
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request' &&
github.actor == 'dependabot[bot]'
runs-on: ubuntu-20.04
timeout-minutes: 1
steps:
- uses: actions/github-script@main
with:
github-token: ${{ github.token }}
script: |
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.workflow_run.pull_requests[0].number }},
event: 'APPROVE'
});
- uses: actions/github-script@main
with:
github-token: ${{ github.token }}
script: |
github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.workflow_run.pull_requests[0].number }}
});