-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.05 KB
/
dependabot_ci.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
35
36
37
38
39
40
41
---
name: Dependabot CI
on:
pull_request_target:
jobs:
lint:
name: Lint Files
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- run: echo "Impersonate the linter workflow"
dependabot_ci:
name: Dependabot CI
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Fetch PR metadata
uses: dependabot/fetch-metadata@v2.0.0
id: dependabot-metadata
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
- name: Merge PR
run: gh pr merge --auto --squash "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}