mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2024-11-06 02:08:05 +00:00
Add commit_user_name and commit_user_email inputs
This commit is contained in:
parent
99f6ce74b4
commit
d47024e59c
@ -29,6 +29,10 @@ Add the following step at the end of your job.
|
|||||||
# Optional repository path
|
# Optional repository path
|
||||||
repository: .
|
repository: .
|
||||||
|
|
||||||
|
# Optional commit user settings
|
||||||
|
commit_user_name: My GitHub Actions Bot
|
||||||
|
commit_user_email: my-github-actions-bot@example.org
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
```
|
```
|
||||||
|
@ -21,6 +21,14 @@ inputs:
|
|||||||
description: Path to git repository
|
description: Path to git repository
|
||||||
required: false
|
required: false
|
||||||
default: '.'
|
default: '.'
|
||||||
|
commit_user_name:
|
||||||
|
description: Name used for the commit user
|
||||||
|
required: false
|
||||||
|
default: GitHub Actions
|
||||||
|
commit_user_email:
|
||||||
|
description: Email address used for the commit user
|
||||||
|
required: false
|
||||||
|
default: actions@github.com
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
|
@ -44,8 +44,8 @@ _setup_git ( ) {
|
|||||||
EOF
|
EOF
|
||||||
chmod 600 $HOME/.netrc
|
chmod 600 $HOME/.netrc
|
||||||
|
|
||||||
git config --global user.email "actions@github.com"
|
git config --global user.name "$INPUT_COMMIT_USER_NAME"
|
||||||
git config --global user.name "GitHub Actions"
|
git config --global user.email "$INPUT_COMMIT_USER_EMAIL"
|
||||||
}
|
}
|
||||||
|
|
||||||
_switch_to_branch() {
|
_switch_to_branch() {
|
||||||
|
Loading…
Reference in New Issue
Block a user