MCPcopy Index your code
hub / github.com/actions/setup-java / removePrivateKeyFromKeychain

Function removePrivateKeyFromKeychain

src/cleanup-java.ts:7–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import {save} from './cache';
6
7async function removePrivateKeyFromKeychain() {
8 if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, {required: false})) {
9 core.info('Removing private key from keychain');
10 try {
11 const keyFingerprint = core.getState(
12 constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT
13 );
14 await gpg.deleteKey(keyFingerprint);
15 } catch (error) {
16 core.setFailed(
17 `Failed to remove private key due to: ${(error as Error).message}`
18 );
19 }
20 }
21}
22
23/**
24 * Check given input and run a save process for the specified package manager

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected