-
Notifications
You must be signed in to change notification settings - Fork 149
39 lines (34 loc) · 1.25 KB
/
dependabot-auto-merge.yml
File metadata and controls
39 lines (34 loc) · 1.25 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
35
36
37
38
39
name: Dependabot auto-merge
on: pull_request_target
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Debug info
run: |
echo "PR Actor: ${{ github.actor }}"
echo "PR URL: ${{ github.event.pull_request.html_url }}"
echo "PR Number: ${{ github.event.pull_request.number }}"
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2, specifically v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Add labels to frontend dependency PRs
run: |
gh pr edit "$PR_URL" --add-label "dependency,automerge"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for all dependency updates
run: |
echo "Enabling auto-merge for PR: $PR_URL"
gh pr merge --auto --squash "$PR_URL"
echo "Auto-merge enabled successfully"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}