-
Notifications
You must be signed in to change notification settings - Fork 6
25 lines (22 loc) · 1.04 KB
/
auto-merge.yml
File metadata and controls
25 lines (22 loc) · 1.04 KB
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
name: auto-merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: (github.event.pull_request.user.login == 'hardwarevisualizerappmanager[bot]' || github.event.pull_request.user.login == 'dependabot[bot]') && github.repository == 'shm11C3/HardwareVisualizer'
steps:
- name: Dependabot metadata
if: github.event.pull_request.user.login == 'dependabot[bot]'
id: metadata
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Bot PRs
if: github.event.pull_request.user.login == 'hardwarevisualizerappmanager[bot]' || (github.event.pull_request.user.login == 'dependabot[bot]' && steps.metadata.outputs.update-type == 'version-update:semver-patch')
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}