Skip to content

Commit c2d414e

Browse files
authored
Merge pull request #268 from opensafely-core/update-dependencies-action
Replace dependabot with update-dependencies-action
2 parents 14f2053 + d6be88e commit c2d414e

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
version: 2
22

33
updates:
4-
- package-ecosystem: "pip"
5-
directory: "/"
6-
schedule:
7-
interval: "weekly"
8-
open-pull-requests-limit: 20
94

105
- package-ecosystem: "github-actions"
116
directory: "/"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update python dependencies
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 23 * * *"
7+
8+
jobs:
9+
update-dependencies:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: "opensafely-core/setup-action@v1"
14+
with:
15+
python-version: "3.11"
16+
install-just: true
17+
18+
- uses: actions/create-github-app-token@v1
19+
id: generate-token
20+
with:
21+
app-id: 1031449 # opensafely-core Create PR app
22+
private-key: ${{ secrets.CREATE_PR_APP_PRIVATE_KEY }}
23+
24+
- uses: opensafely-core/update-dependencies-action@v1
25+
with:
26+
token: ${{ steps.generate-token.outputs.token }}

justfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ upgrade env package="": virtualenv
8989
FORCE=true "{{ just_executable() }}" requirements-{{ env }} $opts
9090

9191

92+
# Updgrade all dev and prod dependencies.
93+
# This is the default input command to update-depndencies action
94+
# https://github.com/opensafely-core/update-dependencies-action
95+
update-dependencies:
96+
just upgrade prod
97+
just upgrade dev
98+
9299
# *args is variadic, 0 or more. This allows us to do `just test -k match`, for example.
93100
# Run the tests
94101
test *args: devenv

0 commit comments

Comments
 (0)