Add project path parameter

This commit is contained in:
2020-10-06 14:56:36 +02:00
committed by GitHub
3 changed files with 7 additions and 1 deletions

View File

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

View File

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

View File

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