Readded first part of git setup
This commit is contained in:
@@ -3,6 +3,13 @@
|
|||||||
# x would be for showing the commands before they are executed
|
# x would be for showing the commands before they are executed
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
|
# FUNCTIONS
|
||||||
|
# Function for setting up git env in the docker container (copied from https://github.com/stefanzweifel/git-auto-commit-action/blob/master/entrypoint.sh)
|
||||||
|
_git_setup ( ) {
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git config --global user.name "GitHub Action"
|
||||||
|
}
|
||||||
|
|
||||||
echo "Installing dependencies..."
|
echo "Installing dependencies..."
|
||||||
pip3 install -U pip wheel pygraphviz
|
pip3 install -U pip wheel pygraphviz
|
||||||
pip3 install -r "$INPUT_PIP_PATH"
|
pip3 install -r "$INPUT_PIP_PATH"
|
||||||
@@ -13,6 +20,8 @@ python3 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
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ `git status --porcelain` ]]; then
|
||||||
|
# Calling method to configure the git environemnt
|
||||||
|
_git_setup
|
||||||
# Commit and push changes back
|
# Commit and push changes back
|
||||||
git commit -am "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>"
|
git commit -am "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>"
|
||||||
git push origin
|
git push origin
|
||||||
|
|||||||
Reference in New Issue
Block a user