From bba1fc0d0b2758b5d42217e6fbc310e62938e1e2 Mon Sep 17 00:00:00 2001 From: crazy-max Date: Tue, 12 May 2020 18:19:34 +0000 Subject: [PATCH] Update generated content --- dist/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index 84a3c8b..0d27e52 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1027,8 +1027,8 @@ function run() { const git_commit_gpgsign = /true/i.test(core.getInput('git_commit_gpgsign')); const git_tag_gpgsign = /true/i.test(core.getInput('git_tag_gpgsign')); const git_push_gpgsign = /true/i.test(core.getInput('git_push_gpgsign')); - const git_committer_name = core.getInput('git_committer_name') || process.env['GITHUB_ACTOR'] || 'github-actions'; - const git_committer_email = core.getInput('git_committer_email') || `${git_committer_name}@users.noreply.github.com`; + const git_committer_name = core.getInput('git_committer_name'); + const git_committer_email = core.getInput('git_committer_email'); core.info('📣 GnuPG info'); const version = yield gpg.getVersion(); const dirs = yield gpg.getDirs(); @@ -1063,16 +1063,19 @@ function run() { core.setOutput('fingerprint', privateKey.fingerprint); core.setOutput('keyid', privateKey.keyID); core.setOutput('email', privateKey.email); + core.setOutput('name', privateKey.name); if (git_user_signingkey) { core.info('🔐 Setting GPG signing keyID for this Git repository'); yield git.setConfig('user.signingkey', privateKey.keyID); + const user_email = git_committer_email || privateKey.email; + const user_name = git_committer_name || privateKey.name; if (git_committer_email != privateKey.email) { core.setFailed('Committer email does not match GPG key user address'); return; } - core.info(`🔨 Configuring Git committer (${git_committer_name} <${git_committer_email}>)`); - yield git.setConfig('user.name', git_committer_name); - yield git.setConfig('user.email', git_committer_email); + core.info(`🔨 Configuring Git committer (${user_name} <${user_email}>)`); + yield git.setConfig('user.name', user_name); + yield git.setConfig('user.email', user_email); if (git_commit_gpgsign) { core.info('💎 Sign all commits automatically'); yield git.setConfig('commit.gpgsign', 'true');