-
Notifications
You must be signed in to change notification settings - Fork 10
34 lines (27 loc) · 965 Bytes
/
autobot.yaml
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
32
33
34
name: "Auto-merge Dependabot"
on:
pull_request:
jobs:
automerge:
name: "Check and merge PR"
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: "ubuntu-latest"
steps:
- name: "Generate GitHub App token"
uses: "actions/create-github-app-token@v1"
id: "app-token"
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: "Fetch metadata"
uses: "dependabot/fetch-metadata@v2"
id: "metadata"
with:
github-token: ${{ steps.app-token.outputs.token }}
- name: "Enable auto-merge"
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
PR: ${{ github.event.pull_request.html_url }}
run: |
gh pr merge --auto --squash "$PR"