1
0
Fork 0
mirror of https://github.com/actions/setup-java synced 2024-11-10 07:32:40 +00:00
setup-java/src/cleanup-java.ts

17 lines
416 B
TypeScript
Raw Normal View History

2020-05-02 11:33:15 +00:00
import * as core from '@actions/core';
import * as gpg from './gpg';
async function run() {
if (core.getInput('gpg-private-key', {required: false})) {
console.log('removing private key from keychain');
try {
const keyFingerprint = core.getState('gpg-private-key-fingerprint');
await gpg.deleteKey(keyFingerprint);
} catch (error) {
core.setFailed(error.message);
}
}
}
run();