From 381f8e67b2edc460b3e1d153d36865b3badd9854 Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 6 Oct 2020 14:53:52 +0200 Subject: [PATCH 1/3] Added project path parameter --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index f674453..7c7176e 100644 --- a/action.yml +++ b/action.yml @@ -23,6 +23,10 @@ inputs: description: Output path for the generated data scheme required: false default: "schema.png" + project_path: + description: Path to the folder where manage.py is located + required: false + default: "./" runs: using: "docker" From 94c8a0bd7866d9c7a71373aa7b871c5587ec88d2 Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 6 Oct 2020 14:55:13 +0200 Subject: [PATCH 2/3] Added project_path to entrypoint script --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index a428e69..d84aa54 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,9 +26,10 @@ _git_changed() { } # PROGRAM -echo "Installing dependencies..." +# echo "Installing dependencies..." # pip install -r $INPUT_PIP_PATH echo "Creating data model..." +cd $INPUT_PROJECT_PATH python manage.py graph_models -a -g-o $INPUT_OUTPUT_PATH # To keep runtime good, just continue if something was changed From 5c68769d079ac51a0021d118b237de10dc1773b4 Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 6 Oct 2020 14:55:22 +0200 Subject: [PATCH 3/3] Added documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a9b7e8c..07aabfa 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A GitHub action for drawing a Django data model automatically. | file_pattern | :x: | \* | Custom git add file pattern | | output_path | :x: | . | Output path for generated files | | pip_path | :x: | requirements.txt | Requirements path for the Django project | +| project_path | :x: | ./ | The path to manage.py | ### Example Config