set git user

This commit is contained in:
phips28 2019-10-26 21:42:48 +02:00
parent 8eca834494
commit b8ad07e55e
2 changed files with 5 additions and 2 deletions

View File

@ -24,8 +24,7 @@ COPY package*.json ./
# Install dependencies # Install dependencies
RUN apt-get update RUN apt-get update
RUN apt-get -y install git RUN apt-get -y install git
RUN git config --global user.name "Bump Version"
RUN git config --global user.email "gh-action-bump-version@users.noreply.github.com"
RUN npm ci RUN npm ci

View File

@ -27,6 +27,10 @@ Toolkit.run(async tools => {
try { try {
const current = pkg.version.toString() const current = pkg.version.toString()
// set git user
await tools.runInWorkspace('git', ['config', 'user.name', '"Bump Version"'])
await tools.runInWorkspace('git', ['config', 'user.email', '"gh-action-bump-version@users.noreply.github.com"'])
await tools.runInWorkspace('git', ['checkout', 'master']) await tools.runInWorkspace('git', ['checkout', 'master'])
await tools.runInWorkspace('npm', await tools.runInWorkspace('npm',
['version', '--allow-same-version=true', '--git-tag-version=false', current]) ['version', '--allow-same-version=true', '--git-tag-version=false', current])