generated from hutchic-org/template-template
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 968 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
31
---
# This file is sync'd from https://github.com/hutchic-org/template-template
# Do not edit this file from anywhere else but that repository it will be overwritten
name: Auto Actions
on: pull_request_target # yamllint disable-line rule:truthy
permissions:
contents: write
pull-requests: write
jobs:
dependabot-automerge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Gather Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.AUTO_MERGE_TOKEN}}
- name: Enable auto-merge
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.AUTO_MERGE_TOKEN}}