mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 01:46:46 +00:00
addressed most of the feedback
This commit is contained in:
parent
01f44229d4
commit
7f2382879a
7 changed files with 130 additions and 51 deletions
|
@ -1,11 +1,14 @@
|
|||
import * as core from '@actions/core';
|
||||
import * as gpg from './gpg';
|
||||
import * as constants from './constants';
|
||||
|
||||
async function run() {
|
||||
if (core.getInput('gpg-private-key', {required: false})) {
|
||||
console.log('removing private key from keychain');
|
||||
if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, {required: false})) {
|
||||
core.info('removing private key from keychain');
|
||||
try {
|
||||
const keyFingerprint = core.getState('gpg-private-key-fingerprint');
|
||||
const keyFingerprint = core.getState(
|
||||
constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT
|
||||
);
|
||||
await gpg.deleteKey(keyFingerprint);
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue