-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10748d4
commit 7e2617a
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,18 @@ | ||
name: 'Auto bump version' | ||
description: 'Bumps target branch version on PR merge' | ||
inputs: | ||
name: | ||
description: 'Name to set git push author' | ||
required: false | ||
default: 'GitHub Actions Bot' | ||
email: | ||
description: 'Email to set git push author' | ||
required: false | ||
default: '[email protected]' | ||
token: | ||
description: 'Write token to the repository' | ||
required: false | ||
default: '' | ||
outputs: | ||
tag: | ||
description: 'New tag' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
const core = require('@actions/core'); | ||
const github = require('@actions/github'); | ||
const { exec } = require('child_process'); | ||
const { exec, execSync } = require('child_process'); | ||
|
||
try { | ||
exec(`git config user.name "GitHub Actions Bot" && git config user.email "[email protected]"`, (err) => { | ||
const inputs = { | ||
name: core.getInput('name'), | ||
email: core.getInput('email'), | ||
token: core.getInput('token') || process.env.TOKEN, | ||
}; | ||
|
||
exec(`git config user.name "${inputs.name}" && git config user.email "${inputs.email}"`, (err) => { | ||
if (err) { | ||
throw err; | ||
} | ||
|