diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 438cc1c..aa3286c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: name: Import GPG private key uses: ./ with: - git_user_gpgsign: true + git_user_signingkey: true git_commit_gpgsign: true git_tag_gpgsign: true git_push_gpgsign: true diff --git a/action.yml b/action.yml index b0515e6..3638fb3 100644 --- a/action.yml +++ b/action.yml @@ -7,8 +7,17 @@ branding: icon: 'lock' inputs: - git_gpgsign: - description: 'Enable signing for this Git repository' + git_user_signingkey: + description: 'Set GPG signing keyID for this Git repository' + default: 'false' + git_commit_gpgsign: + description: 'Sign all commits automatically. git_user_signingkey needs to be enabled' + default: 'false' + git_tag_gpgsign: + description: 'Sign all tags automatically. git_user_signingkey needs to be enabled' + default: 'false' + git_push_gpgsign: + description: 'Sign all pushes automatically. git_user_signingkey needs to be enabled' default: 'false' git_committer_name: description: 'Commit author''s name' diff --git a/dist/index.js b/dist/index.js index d57945f..6d3ab3e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1023,10 +1023,10 @@ function run() { core.setFailed('GPG private key required'); return; } + const git_user_signingkey = /true/i.test(core.getInput('git_user_signingkey')); 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_user_signingkey = /true/i.test(core.getInput('git_user_signingkey')); 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`; core.info('📣 GnuPG info'); diff --git a/src/main.ts b/src/main.ts index 6f2072c..e7700a4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,10 +11,10 @@ async function run(): Promise { return; } + const git_user_signingkey = /true/i.test(core.getInput('git_user_signingkey')); 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_user_signingkey = /true/i.test(core.getInput('git_user_signingkey')); const git_committer_name: string = core.getInput('git_committer_name') || process.env['GITHUB_ACTOR'] || 'github-actions'; const git_committer_email: string =