Skip to content

Commit d0ee7c3

Browse files
author
Ian Walter
authored
Update index.js
1 parent 6bbc534 commit d0ee7c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ async function run () {
3434
const args = ['diff', '--staged', '--name-only']
3535
const { stdout: hasStaged } = await execa('git', args)
3636
if (hasStaged) {
37+
// Configure the git user.
38+
const author = 'github-actions[bot]'
39+
await execa('git', ['config', '--global', 'user.name', author])
40+
const email = 'github-actions[bot]@users.noreply.github.com'
41+
await execa('git', ['config', '--global', 'user.email', email])
42+
3743
// Commit the changes.
3844
const message = process.env.INPUT_MESSAGE || 'Automated commit'
3945
await execa('git', ['commit', '-m', message])

0 commit comments

Comments
 (0)