mirror of
https://github.com/actions/setup-java.git
synced 2024-12-02 05:10:57 -05: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();
|