Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "Place git user configuration inline before commit"" #63

Merged
merged 1 commit into from
Apr 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ _main() {

echo "::set-output name=changes_detected::true"

_setup_git

_switch_to_branch

_add_files
Expand Down Expand Up @@ -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";

Expand All @@ -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() {
Expand Down