2023-05-27 11:40:06 +02:00
|
|
|
name: Dependabot auto merge
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: [CI]
|
|
|
|
types:
|
|
|
|
- completed
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
automerge:
|
|
|
|
name: Auto merge "${{ github.event.workflow_run.head_branch }}"
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
if: >
|
|
|
|
github.event.workflow_run.event == 'pull_request'
|
|
|
|
&& github.event.workflow_run.conclusion == 'success'
|
|
|
|
&& github.actor == 'dependabot[bot]'
|
|
|
|
&& startsWith(github.event.workflow_run.head_branch, 'dependabot/')
|
|
|
|
steps:
|
|
|
|
- name: Checkout source
|
2023-09-25 02:51:20 +02:00
|
|
|
uses: actions/checkout@v4.1.0
|
2023-05-27 11:40:06 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.workflow_run.head_commit.id }}
|
|
|
|
|
|
|
|
- name: Instruct @dependabot to merge
|
|
|
|
run: "gh issue comment $ISSUE_ID --body \"(This is an automated comment from workflow $WORKFLOW_URL)\n\n@dependabot squash and merge\""
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.DEPENDABOT_COMMENT_TOKEN }}
|
|
|
|
ISSUE_ID: ${{ github.event.workflow_run.pull_requests[0].number }}
|
|
|
|
WORKFLOW_URL: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}
|