From b8ad07e55e1f08ef56e3fa9fb7382c0e7195b99e Mon Sep 17 00:00:00 2001 From: phips28 Date: Sat, 26 Oct 2019 21:42:48 +0200 Subject: [PATCH] set git user --- Dockerfile | 3 +-- index.js | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d038813..8c1b36e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,7 @@ COPY package*.json ./ # Install dependencies RUN apt-get update 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 diff --git a/index.js b/index.js index 02c9b50..830abe9 100644 --- a/index.js +++ b/index.js @@ -27,6 +27,10 @@ Toolkit.run(async tools => { try { 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('npm', ['version', '--allow-same-version=true', '--git-tag-version=false', current])