Skip to content

Commit d6b3a5b

Browse files
authored
feat: support custom git config
1 parent a236b01 commit d6b3a5b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,12 @@ inputs:
3434
default: ''
3535
changelog_increment_filename:
3636
description: 'Filename to store the incremented generated changelog. This is different to changelog as it only contains the changes for the just generated version'
37-
required: false
37+
required: false
38+
git_name:
39+
description: 'Name used to configure git (for git operations)'
40+
required: false
41+
default: 'github-actions[bot]'
42+
git_email:
43+
description: 'Email address used to configure git (for git operations)'
44+
required: false
45+
default: '41898282+github-actions[bot]@users.noreply.github.com'

entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ cz version
2525

2626

2727
echo "Configuring git user and email..."
28-
git config --local user.email "action@github.com"
29-
git config --local user.name "GitHub Action"
28+
git config --local user.name "$INPUT_GIT_NAME"
29+
git config --local user.email "$INPUT_GIT_EMAIL"
30+
echo "Git name: $(git config --get user.name)"
31+
echo "Git email: $(git config --get user.email)"
3032

3133

3234
echo "Running cz: $INPUT_DRY_RUN $INPUT_CHANGELOG $INPUT_PRERELEASE"

0 commit comments

Comments
 (0)