Skip to content

Commit

Permalink
Merge pull request #268 from opensafely-core/update-dependencies-action
Browse files Browse the repository at this point in the history
Replace dependabot with update-dependencies-action
  • Loading branch information
rebkwok authored Oct 24, 2024
2 parents 14f2053 + d6be88e commit c2d414e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
version: 2

updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 20

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update python dependencies

on:
workflow_dispatch:
schedule:
- cron: "0 23 * * *"

jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "opensafely-core/setup-action@v1"
with:
python-version: "3.11"
install-just: true

- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: 1031449 # opensafely-core Create PR app
private-key: ${{ secrets.CREATE_PR_APP_PRIVATE_KEY }}

- uses: opensafely-core/update-dependencies-action@v1
with:
token: ${{ steps.generate-token.outputs.token }}
7 changes: 7 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ upgrade env package="": virtualenv
FORCE=true "{{ just_executable() }}" requirements-{{ env }} $opts


# Updgrade all dev and prod dependencies.
# This is the default input command to update-depndencies action
# https://github.com/opensafely-core/update-dependencies-action
update-dependencies:
just upgrade prod
just upgrade dev

# *args is variadic, 0 or more. This allows us to do `just test -k match`, for example.
# Run the tests
test *args: devenv
Expand Down

0 comments on commit c2d414e

Please sign in to comment.