-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 1.12 KB
/
Copy pathautobot.yml
File metadata and controls
34 lines (28 loc) · 1.12 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
26
27
28
29
30
31
32
33
34
name: Dependabot automation
on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- synchronize
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Fetch Dependabot metadata
id: metadata
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-approve for Dependabot PRs
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
run: gh pr review --approve "${PR_URL}"
- name: Enable auto-approve for Dependabot PRs
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
run: gh pr merge --squash --auto "${PR_URL}" || gh pr merge --merge --auto "${PR_URL}" || gh pr merge --rebase --auto "${PR_URL}"