Merge pull request #19 from Sonic-Web-Dev/feat/override-cred

feat: allow email and user to be overridden
This commit is contained in:
Phil 2020-04-28 18:51:58 +02:00 committed by GitHub
commit a19c430652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ Toolkit.run(async tools => {
try { try {
const current = pkg.version.toString() const current = pkg.version.toString()
// set git user // set git user
await tools.runInWorkspace('git', ['config', 'user.name', '"Automated Version Bump"']) await tools.runInWorkspace('git', ['config', 'user.name', `"${process.env.GITHUB_USER || "Automated Version Bump"}"`])
await tools.runInWorkspace('git', ['config', 'user.email', '"gh-action-bump-version@users.noreply.github.com"']) await tools.runInWorkspace('git', ['config', 'user.email', `"${process.env.GITHUB_EMAIL || "gh-action-bump-version@users.noreply.github.com"}"`])
const currentBranch = /refs\/[a-zA-Z]+\/(.*)/.exec(process.env.GITHUB_REF)[1] const currentBranch = /refs\/[a-zA-Z]+\/(.*)/.exec(process.env.GITHUB_REF)[1]
console.log('currentBranch:', currentBranch) console.log('currentBranch:', currentBranch)