Skip to content

Commit

Permalink
Merge pull request #251 from ebmdatalab/steve/update-dependencies-action
Browse files Browse the repository at this point in the history
Use update-dependencies action for Python dependencies
  • Loading branch information
StevenMaude authored Oct 30, 2024
2 parents f409af4 + 6bdc226 commit d6bf90c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
version: 2

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

- package-ecosystem: "github-actions"
directory: "/"
schedule:
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: "5 6 * * *"

jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "opensafely-core/setup-action@v1"
with:
python-version: "3.12"
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 }}
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ upgrade env package="": virtualenv
FORCE=true "{{ just_executable() }}" requirements-{{ env }} $opts


update-dependencies: virtualenv
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 d6bf90c

Please sign in to comment.