mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-06 05:35:51 -05:00
Update generated content
This commit is contained in:
parent
ccc720bb40
commit
bba1fc0d0b
1 changed files with 8 additions and 5 deletions
13
dist/index.js
generated
vendored
13
dist/index.js
generated
vendored
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue