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 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" 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