forked from DataDog/integrations-core
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (74 loc) · 2.73 KB
/
update-dependencies.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Update the dependencies
on:
workflow_dispatch:
schedule:
# At 2AM on Monday (UTC)
- cron: "0 2 * * 1"
jobs:
update_dependencies:
name: Update the dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install ddev from local folder
run: |-
pip install -e ./datadog_checks_dev[cli]
pip install -e ./ddev
- name: Configure ddev
run: |-
ddev config set repos.core .
ddev config set repo core
- name: Create token
uses: actions/create-github-app-token@v1
id: token-generator
with:
app-id: ${{ secrets.DD_AGENT_INTEGRATIONS_BOT_APP_ID }}
private-key: ${{ secrets.DD_AGENT_INTEGRATIONS_BOT_PRIVATE_KEY }}
repositories: integrations-core
- name: Update dependencies
run: |-
ddev dep updates --sync
- name: Update licenses
run: |-
ddev validate licenses --sync
env:
DD_GITHUB_USER: "${{ github.actor }}"
DD_GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# We generate the changelog hoping we guess the PR number correctly.
# We are likely to succeed because the job runs during quiet hours.
# If we guess the PR number wrong, the validation will catch it and suggest a simple fix.
- name: Update changelogs
env:
DD_GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |-
ddev release changelog new added -m "Update dependencies"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.token-generator.outputs.token }}
commit-message: Update dependencies
body: |
### What does this PR do?
Update the dependencies
This PR was automatically generated by the following workflow:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
**THE CHANGELOG FILES OFTEN HAVE THE WRONG PR NUMBER. MAKE SURE TO CHECK THEM!**
### Review checklist (to be filled by reviewers)
- [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
- [ ] [Changelog entries](https://datadoghq.dev/integrations-core/guidelines/pr/#changelog-entries) must be created for modifications to shipped code
- [ ] Add the `qa/skip-qa` label if the PR doesn't need to be tested during QA.
title: Update dependencies
branch: bot/update-dependencies
branch-suffix: timestamp
delete-branch: true
base: master
labels: bot,qa/skip-qa
draft: false