mirror of
https://github.com/actions/setup-java
synced 2024-11-10 07:32:40 +00:00
17 lines
416 B
TypeScript
17 lines
416 B
TypeScript
|
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();
|