mirror of
https://github.com/actions/setup-java.git
synced 2024-11-27 03:59:02 +00:00
20 lines
500 B
TypeScript
20 lines
500 B
TypeScript
import * as core from '@actions/core';
|
|
import * as gpg from './gpg';
|
|
import * as constants from './constants';
|
|
|
|
async function run() {
|
|
if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, {required: false})) {
|
|
core.info('removing private key from keychain');
|
|
try {
|
|
const keyFingerprint = core.getState(
|
|
constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT
|
|
);
|
|
await gpg.deleteKey(keyFingerprint);
|
|
} catch (error) {
|
|
core.setFailed(error.message);
|
|
}
|
|
}
|
|
}
|
|
|
|
run();
|