mirror of
https://gitea.com/actions/setup-java.git
synced 2025-11-10 07:47:05 +00:00
Added support for GPG
This commit is contained in:
16
src/cleanup-java.ts
Normal file
16
src/cleanup-java.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user