From 80c7ed953feb51a2bccfd85f4f2c08435ca21ced Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Fri, 10 Apr 2020 11:38:03 +1200 Subject: [PATCH] Place git user configuration inline --- entrypoint.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index a7714ca..24e078f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,8 +9,6 @@ _main() { echo "::set-output name=changes_detected::true" - _setup_git - _switch_to_branch _add_files @@ -38,12 +36,6 @@ _git_is_dirty() { [ -n "$(git status -s)" ] } -# Set up git user configuration -_setup_git ( ) { - git config --global user.name "$INPUT_COMMIT_USER_NAME" - git config --global user.email "$INPUT_COMMIT_USER_EMAIL" -} - _switch_to_branch() { echo "INPUT_BRANCH value: $INPUT_BRANCH"; @@ -58,7 +50,7 @@ _add_files() { _local_commit() { echo "INPUT_COMMIT_OPTIONS: ${INPUT_COMMIT_OPTIONS}" - git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"} + git -c user.name="$INPUT_COMMIT_USER_NAME" -c user.email="$INPUT_COMMIT_USER_EMAIL" commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"} } _tag_commit() {