-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (33 loc) · 1.05 KB
/
dependabot-actions.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
name: Dependabot Automation
on:
pull_request:
branches:
- main
- dev
types: [opened, edited, reopened, synchronize]
permissions:
pull-requests: write
issues: write
repository-projects: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ github.token }}"
- name: Add a label for all production dependencies
if: steps.metadata.outputs.dependency-type == 'direct:production'
run: gh pr edit "$PR_URL" --add-label "production"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{ github.token }}
- name: Add a label for all production dependencies
if: steps.metadata.outputs.dependency-type != 'direct:production'
run: gh pr edit "$PR_URL" --add-label "patch"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{ github.token }}