-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (55 loc) · 1.83 KB
/
dependabot.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Dependabot
on:
pull_request_target:
branches: dependabot/**
permissions:
pull-requests: write
issues: write
repository-projects: write
contents: write
# Set environment variables available in all jobs and steps
env:
python_version: "3.10"
jobs:
update-go:
uses: ./.github/workflows/update-utils.yml
secrets: inherit
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
needs: update-utils
steps:
# Checkout with full history for to allow compare with base branch
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install CI/CD tools
run: pip install continuous-delivery-scripts && pip list
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Add a label
run: gh pr edit "$PR_URL" --add-label "bot"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Approve the PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Assert news
run: bash ./scripts/setup_github.sh && cd-assert-news -b ${CI_ACTION_REF_NAME}
env:
GIT_TOKEN: ${{ secrets.GIT_SECRET }}
- name: Auto-merge the PR
run: gh pr merge --auto --squash --body "Dependency upgrade $PR_URL" --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}