Add project path parameter
This commit is contained in:
@@ -13,6 +13,7 @@ A GitHub action for drawing a Django data model automatically.
|
|||||||
| file_pattern | :x: | \* | Custom git add file pattern |
|
| file_pattern | :x: | \* | Custom git add file pattern |
|
||||||
| output_path | :x: | . | Output path for generated files |
|
| output_path | :x: | . | Output path for generated files |
|
||||||
| pip_path | :x: | requirements.txt | Requirements path for the Django project |
|
| pip_path | :x: | requirements.txt | Requirements path for the Django project |
|
||||||
|
| project_path | :x: | ./ | The path to manage.py |
|
||||||
|
|
||||||
### Example Config
|
### Example Config
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ inputs:
|
|||||||
description: Output path for the generated data scheme
|
description: Output path for the generated data scheme
|
||||||
required: false
|
required: false
|
||||||
default: "schema.png"
|
default: "schema.png"
|
||||||
|
project_path:
|
||||||
|
description: Path to the folder where manage.py is located
|
||||||
|
required: false
|
||||||
|
default: "./"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "docker"
|
using: "docker"
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ _git_changed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# PROGRAM
|
# PROGRAM
|
||||||
echo "Installing dependencies..."
|
# echo "Installing dependencies..."
|
||||||
# pip install -r $INPUT_PIP_PATH
|
# pip install -r $INPUT_PIP_PATH
|
||||||
echo "Creating data model..."
|
echo "Creating data model..."
|
||||||
|
cd $INPUT_PROJECT_PATH
|
||||||
python manage.py graph_models -a -g-o $INPUT_OUTPUT_PATH
|
python manage.py graph_models -a -g-o $INPUT_OUTPUT_PATH
|
||||||
|
|
||||||
# To keep runtime good, just continue if something was changed
|
# To keep runtime good, just continue if something was changed
|
||||||
|
|||||||
Reference in New Issue
Block a user