-
-
Notifications
You must be signed in to change notification settings - Fork 242
30 lines (29 loc) · 878 Bytes
/
automerge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Merge dependency updates
on:
workflow_run:
types:
- "completed"
workflows:
- "CI"
workflow_call:
jobs:
merge:
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
if: >-
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.actor.login == 'dependabot[bot]'
steps:
- name: "Get PR information"
uses: potiuk/get-workflow-origin@v1_5
id: source-run-info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
- run: 'gh pr merge --squash https://github.com/$GITHUB_REPOSITORY/pull/$GITHUB_PR'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR: ${{ steps.source-run-info.outputs.pullRequestNumber }}