From 53694caedd8d4a60689a1150c67ca25471f7b13f Mon Sep 17 00:00:00 2001 From: Iain Dillingham Date: Thu, 21 Mar 2024 11:58:13 +0000 Subject: [PATCH] Update instructions for adding a new action We don't have a management command, any more. --- DEVELOPERS.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/DEVELOPERS.md b/DEVELOPERS.md index c230d1e..52f2bc0 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -38,18 +38,20 @@ Any args are passed to pytest. Deployment uses `dokku` and requires the environment variables defined in `dotenv-sample`. It is deployed to our `dokku3` instance (see [Dokku Deployment](https://bennettinstitute-team-manual.pages.dev/tools-systems/dokku/)). -## Updating the database +## Adding a new action -As the `dokku` user on dokku3, run: +To add a new action, first edit `actions/jobs/daily/fetch_action.py`. + +Then, as the `dokku` user on dokku3, run: $ dokku enter actions-registry This starts a bash session connected to the docker container running the application. -You can now run any Django management command, including: +Finally, run: - $ ./manage.py fetch_action opensafely-actions [repo-name] + $ python manage.py runjob actions fetch_action -This fetches metadata about the given action from GitHub. +This fetches metadata about all actions from GitHub. ## Updating the GitHub token